1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Alja [10]
3 years ago
6

If a ≤m b and b is regular, does that imply that a is a regular language? why or why not?

Computers and Technology
1 answer:
hichkok12 [17]3 years ago
4 0
Answer: No. For example, define the languages A = { 0 n1 n | n ≥ 0 } and B = {1}, both over the alphabet Σ = {0, 1}. Define the function f : Σ∗ → Σ∗ as
You might be interested in
Write an algorithm to calculate the average<br> value of array of integer elements
amid [387]

Answer:

Explanation: Input : arr[] = {1, 2, 3, 4, 5}

Output : 3

Sum of the elements is 1+2+3+4+5 = 15

and total number of elements is 5.

So average is 15/5 = 3

Input : arr[] = {5, 3, 6, 7, 5, 3}

Output : 4.83333

Sum of the elements is 5+3+6+7+5+3 = 29

and total number of elements is 6.

So average is 29/6 = 4.83333.

7 0
3 years ago
which programming paradigm do programmers follow to write code for event driven applications? a. object oriented programming. b.
7nadin3 [17]

Answer:

D) Procedural

Explanation:

7 0
3 years ago
________ programs help solve the problem of running out of storage space by providing lists of application programs, stored vide
Leviafan [203]

Answer:

Storage management

Explanation:

The programs that do this are known as Storage management programs. They are incredibly useful since they allow you to see which files are taking up the most amount of space as well as the importance that each file has on the system. Many of these programs have a different visual representation of the files such as pie charts or system blocks showing the percentage of space it is taking up. Everything in these programs is made to help the end-user visualize and analyze their data thoroughly.

7 0
3 years ago
Define a method pyramidVolume with double parameters baseLength, baseWidth, and pyramidHeight, that returns as a double the volu
marysya [2.9K]
<h2>Question:</h2>

Define a method pyramidVolume with double parameters baseLength, baseWidth, and pyramidHeight, that returns as a double the volume of a pyramid with a rectangular base. Relevant geometry equations:

Volume = base area x height x 1/3

Base area = base length x base width.

(Watch out for integer division)

import java.util.Scanner;

public class CalcPyramidVolume {

   /* Your solution goes here */

   public static void main (String [] args) {

     System.out.println("Volume for 1.0, 1.0, 1.0 is: " + pyramidVolume(1.0, 1.0,   1.0));

     return;

    }

}

<h2>Answer:</h2><h2></h2>

import java.util.Scanner;

public class CalcPyramidVolume {

   /* Your solution goes here */

   public static void main (String [] args) {

       System.out.println("Volume for 1.0, 1.0, 1.0 is: " + pyramidVolume(1.0, 1.0, 1.0));

       return;

   }

   

   //Begin method definition

   public static double pyramidVolume(double baseLength, double baseWidth, double pyramidHeight){

       

       //First, calculate the base area of the pyramid

       //store the result in a double variable

       double baseArea = baseLength * baseWidth;

       

       //Then, calculate the volume of the pyramid

       //using the base area and the base width

       double volume = 1 / 3.0 * baseArea * pyramidHeight;

       

       //return the volume

      return volume;

   }

}

<h2>Output:</h2>

Volume for 1.0, 1.0, 1.0 is: 0.3333333333333333

<h2>Explanation:</h2>

The code above contains comments explaining the important lines of the code. The output of the code has also been provided above.

The parts of the code that are worth noting are:

(i) The return type of the method pyramidVolume should be a <em>double</em> since calculations are done using <em>double</em> values. i.e the method header should be written as

<em>public static double pyramidVolume(){</em>

<em>}</em>

<em />

(ii) The method requires three(3) parameters of type double: baseLength, baseWidth and pyramidHeight. These should be included in the method. Therefore, the complete header definition should be:

<em>public static double pyramidVolume(double baseLength, double baseWidth, double pyramidHeight){</em>

<em />

<em>}</em>

(iii) The formula for calculating the volume of the pyramid should be:

volume = 1 / 3.0 * baseArea * baseWidth;

Rather than;

volume = 1 / 3 * baseArea * baseWidth;

This is because integer division yields integer result. If 1 / 3 is evaluated, the result will be 0 since the decimal part will be truncated thereby making the result of the volume = 1 / 3 * baseArea * baseWidth will be 0.

Therefore, the work around for that should be to write 1 / 3.0 or 1.0 / 3.0 or 1.0 / 3.

(iv) After the calculation, the result of volume should be returned by the method. This will enable a proper call by the main method for execution.

7 0
3 years ago
What is the method for removing a domain controller in windows server 2012 r2?
-Dominant- [34]
Basically, you're going to use the Remove Roles and Features wizard.  However, there's a few more commands you can log into your computer to remove the controller as well.  You can use the dcpromo.exe command, the adprep.exe command, and then you can also alter the domain controllers through ADD roles and features wizard.
8 0
3 years ago
Other questions:
  • Earthquakes happen in the Earth’s
    10·1 answer
  • Why do nonprofit agencies often include blogs on their websites?
    5·1 answer
  • What is the decimal equivalent of the largest binary integer that can be obtained with
    9·1 answer
  • You can use______ in order to allow the user to browse and find a file at run time.
    15·1 answer
  • How and why do engineers use models?
    15·1 answer
  • A network technician is designing a network for a small company. The network technician needs to implement an email server and w
    12·1 answer
  • You develop an app, and you don’t want anyone to resell it or modify it. This is an example of: A
    5·1 answer
  • c) If you are at foreign country visit, which banking card would you prefer to keep with you during visit (Debit Card or Credit
    10·1 answer
  • state how to transfee information from website to el processing document in computers and technology.​
    12·1 answer
  • Take values of length and breadth of a rectangle from the user and check if it is square or not.
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!