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
elena-14-01-66 [18.8K]
3 years ago
5

1. Give state diagrams (pictures) for Turing Machines that decide the following languages over the alphabet {0.1}: 1. {w | w con

tains an equal number of 0s and 1s} 2. {w | w does not contain twice as many 0s as 1s}

Computers and Technology
1 answer:
Gennadij [26K]3 years ago
6 0

Answer:

Please kindly see explaination

Explanation:

1. Scan the tape and mark the first 1 which has not been marked. If no unmarked 1’s are

found go to stage 5. Otherwise, move the head back to the start of the tape

2. Scan the tape until an unmarked 0 is found, mark the 0, if no 0’s are found accept

3. Scan the tape once more until an unmarked zero is found, mark the 0, if no 0’s are found, accept.

4. Move the head back to the start of the tape and go to stage 1

5. Move the head back to the start of the tape. Scan the tape to see if any unmarked 0’s are

found. If none are found reject, otherwise accept.

Check attachment for the drawings.

You might be interested in
Help me out on question 29 and 30 please
Elanso [62]

Answer:

It 5

Explain

number 28 is A and number 29 is 5

5 0
2 years ago
This OS was created by a developer named Torvalds.
GREYUIT [131]
The answer to this problem is Linux
7 0
3 years ago
The correct or acceptable way of communicating on the internet is known as
stepladder [879]
I want to say e-mail.

8 0
3 years ago
PLZ HELP IM IN A HURRY Select all that apply.
chubhunter [2.5K]

Answer:

                                                       

Explanation:

<h3>                             </h3>
8 0
3 years ago
Write a program that calculates the future value of an investment at a given interest rate for a specified number of years. The
baherus [9]
<h2>Question:</h2>

Write a program that calculates the future value of an investment at a given interest rate for a specified number of years. The formula for the calculation is as follows:

futureValue = investmentAmount * (1 + monthlyInterestRate) ^ years * 12

Note: Allow users to enter the values of the investmentAmount, monthlyInterestRate and years from standard input.

Assume the number of years is always a whole number.

<h2>Answer:</h2>

===================================================

//import the Scanner class

import java.util.Scanner;

//Class header definition

public class FutureValue{

   

    //Main method definition

    public static void main(String []args){

       

       //Create an object of the Scanner class

       Scanner input = new Scanner(System.in);

       

       //Prompt the user to enter the investment amount

       System.out.println("Enter the investment amount");

       

       //Store the input in a double variable called investmentAmount

       double investmentAmount = input.nextDouble();

       

       //Next, prompt the user to enter the interest rate

       System.out.println("Enter the interest rate in percentage");

       

       //Store the input in a double variable called interestRate

       double interestRate = input.nextDouble();

       

       //Convert the interest rate to decimal by multiplying by 0.01

       interestRate *= 0.01;

       

       //Convert the interest rate to monthly interest rate by dividing the

       //result above by 12

       double monthlyInterestRate = interestRate / 12;

       

       //Prompt the user to enter the number of years

       System.out.println("Enter the number of years");

       

       //Store the input in an integer variable called years

       int years = input.nextInt();

       

       //Using the given formula, find the future value

      double futureValue =  investmentAmount * Math.pow(1 + monthlyInterestRate, years * 12);

       

       //Print out the future value

      System.out.println("Future value : " + futureValue);

       

    } //End of main method

     

}  // End of class definition

===================================================

<h2>Sample Output</h2>

===================================================

<em>>> Enter the investment amount </em>

1000

>> <em>Enter the interest rate in percentage </em>

10

>> <em>Enter the number of years </em>

5

Future value : 1645.3089347785854

===================================================

<h2>Explanation:</h2>

The code above has been written using Java. The code contains comments explaining every line of the code. Please go through the comments. The actual lines of code have been written in bold-face to distinguish them from comments. A sample output has also been provided as a result of a run of the code.

8 0
3 years ago
Other questions:
  • You want to divide the value in cell D3 by the value in cell E3. Which formula should you use?
    11·2 answers
  • A small company has hired you to take over its IT needs. The company currently has seven on-site employees and 12 remote employe
    12·1 answer
  • Help me please! (*18* points!)
    5·1 answer
  • Hannah decides to burn her video portfolio to a DVD. She wants to hand it over to a movie producer she will meet at a social eve
    15·1 answer
  • PLS HELP ;CC
    12·1 answer
  • PLEASE HELP!!!!! WILL MARK BEST ANSWER BRAINLIEST!!!~~~
    11·2 answers
  • Could you give me Aidan Gallagher's wuasp number​
    5·2 answers
  • Write the following numbers in binary. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25
    11·1 answer
  • How does naming affect a variable’s creation and use?
    6·1 answer
  • What is a program that includes a function parameter capable of doing?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!