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
choli [55]
3 years ago
11

Draw an FA over {0, 1}which represent binaries of Integers only divisible by 3. Allleading 0’s are permissible. [10]

Computers and Technology
1 answer:
suter [353]3 years ago
6 0

Answer:

As we need to design the FA for the numbers divisible by 3, so we have to take the states as the remainders when we divide the numbers by 3.

Any number when divided by 3, gives remainder either 0 or 1 or 2. And the number gives remainder 0 is divisible by 3.

Let’s take

  • state 0 for remainder 0.
  • state 1 for remainder 1.
  • state 2 for remainder 2.

So now lets count from 0:

Binary 0 = decimal 0 %3 = 0, so goes to state 0.

Binary 1 =decimal 1 %3 = 1, goes to state 1.

Binary 10 = decimal 2 %3 =2, goes to state 2.

Bianary 11 = decimal 3 %3 =0, goes to state 0.

Bianary 100 = decimal 4 %3 =1, goes to state 1.

Bianary 101 = decimal 5 %3 =2, goes to state 2.

And so on.  

So here the state 0 will be the start state and also the final state.

Explanation:

So the FA is {{0,1,2}, {0,1}, δ, 0, {0}}

where δ(0, 0) = 0

           δ(0, 1) = 1

           δ(1, 0) = 2

           δ(1, 1) = 0

           δ(2, 0) = 1

           δ(2, 1) = 2

You might be interested in
Please help me with these questions.
schepotkina [342]

the second one is correct

and the 3rd and 4th

8 0
3 years ago
The jaws of ________ chucks are advanced and retracted independently of each other and allow for fine-tuning the position of the
harkovskaia [24]

The correct answer for this would be wood(chucks)

4 0
3 years ago
Proxy data:
lapo4ka [179]

Answer: provide climate data representing times when instruments were not available to measure them.

Explanation:

Proxy data provides climate data representing times when instruments were not available to measure them.

6 0
4 years ago
Given two integers as user inputs that represent the number of drinks to buy and the number of bottles to restock, create a Vend
Zanzabum

Answer:

import java.util.Scanner;

class Main {

 public static void main (String args[])

 {

   Scanner input = new Scanner(System.in);

   VendingMachine machine = new VendingMachine(20);

   System.out.print("Enter nr to purchase: ");

   int nrPurchased = input.nextInt();

   System.out.print("Enter nr to re-stock: ");

   int nrRestock = input.nextInt();

   machine.Transaction(nrPurchased, nrRestock);

   input.close();

 }

}

class VendingMachine {

 private int inventory;

 public VendingMachine(int initialInventory) {

   inventory = initialInventory;

 }

 public void Transaction(int nrToBuy, int nrToRestock) {

   inventory += nrToRestock - nrToBuy;

   System.out.printf("Inventory: %d bottles.\n", inventory);

 }

}

7 0
3 years ago
Create a list of strings based on a list of numbers The rules:_______
Delicious77 [7]

Answer:

listNumbers = [34,56,23,56,78,89,98,45,34,33,25,26,67,78]

listString = [ ]

for i in range(14):

   if listNumbers[i]%2!=0 and listNumbers[i]%5==0:

       listString.append("five odd")

   elif listNumbers[i]%5==0 and listNumbers[i]%2==0:

       listString.append("five even")

   elif listNumbers[i]%2==0:

       listString.append("even")

   elif listNumbers[i]%2!=0:

       listString.append("odd")

print(listNumbers)

print(listString)

Explanation:

In python programming language;

  1. Create two lists
  2. The first is a list of numbers and initialize it with random values: listNumbers = [34,56,23,56,78,89,98,45,34,33,25,26,67,78]
  3. The second list is empty and will hold the string values listString = [ ]
  4. Use a for loop to iterate over all the elementts in the list of numbers
  5. Use the modulo operator (%) to chech for multiples of particular numbers as stipulated by the question
  6. Use combination of if/elif statements for each condition
  7. Use the .append method to add the elements into the list of strings
  8. finially output both lists

See attached code and output

3 0
3 years ago
Other questions:
  • . Which game was the most popular free download in Apple®’s app store by January 2014, despite poor reviews and plagiarism accus
    14·2 answers
  • The company involved in an attack by Oleg Zezev from Kazahkstan, in which Zezev accessed computer data and copied personal infor
    12·1 answer
  • What are tags?
    13·1 answer
  • Which of these tools can best be used as a self assessment for career planning purposes
    12·1 answer
  • What element of a timeline helps to mark progress of the project?
    15·1 answer
  • To increase the view of a document on the screen, use the _____. View icon Zoom slider full-screen reading boldface font
    9·1 answer
  • What is Mainframe computer​
    14·1 answer
  • As you are learning a client’s programming needs, you realize the program will require an iteration of tasks, yet there are exce
    13·1 answer
  • In a dark place you have only a match , a twig , campfire logs , and oil lamp and a candle which do you literally first /
    15·1 answer
  • Data is communicated through various input devices true or false​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!