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
Bogdan [553]
3 years ago
14

Alex writes down a string with four digits. (Since this is a string, not a number, it can start with a $0.$ For example, Alex co

uld write $0472.$) Alex then feeds this string into a special counting machine, which counts the number of times the digits $0,$ $1,$ $2,$ and $3$ appear in Alex's string, and then prints out the result. For example, suppose Alex wrote $2322.$ The machine counts the number of times $0$ appears (which is $0$ times), the number of times $1$ appears (which is also $0$ times), the number of times $2$ appears (which is $3$ times), and the number of times $3$ appears (which is $1$ time). So the machine prints out "$0031$". As another example, if Alex writes the string $0702,$ then the machine prints out "$2010$". Alex wants to see if there are any four-digit strings that they can write down, so that the string the machine prints out is the same as the string that they fed into the machine. We'll call this an automatic string.
(a) Prove that an automatic string cannot contain a digit that is $5$ or greater.
(b) Prove that an automatic string cannot contain a $4.$
(c) Prove that an automatic string cannot contain a $3.$
(d) Find all automatic strings.
Computers and Technology
1 answer:
Artist 52 [7]3 years ago
8 0

Answer: The answers to all parts of this question are based on "automatic string". The condition is also provided which states that the string the machine outputs is the same string (4-digit string) which is fed to the machine as input.

Explanation: (a) The string will not remain automatic string if it contains a digit greater or equal to $5$. As we know that machine should print the same string which is fed into it. In this case the machine will insert a 0 in place of $5$. So the number is inserting a 0 when it is output by the counting machine. For example if we input $2152$ machine will print "$0120$" which shows that the digits are not the same as fed to the machine. If we take string $0702,$ which is given in the question, we see that machine prints out "$2010$" which means that number is inserting a 0 so automatic string cannot contain a digit greater than $5$

(b) The same answer as given in (a). For example the if we write $4220$ machine prints out "$1020$".  So the automatic string cannot contain $4.$

(c) This is a bit tricky as machine count the digit $3$. Lets take an example string $3303$. the machine prints out "$1003$". It counts three BUT its not an automatic string because the string printed out is different from the string that was fed to the machine. So automatic string cannot contain $3.$

(d) Now we know that an automatic string cannot contain digits 3,4,5 and above. So it can contain digits 0,1 and 2 with 0 at the end as the automatic string cannot contain digit 3 or above.Lets take a few examples of strings with combinations of 0,1 and 2 to check if they are automatic strings.

  • $1220$ the machine prints $1120$ which is not the same as fed into machine so its not an automatic string.
  • $2020$ the machine prints out "$2020$". Its 2 times "$0$", 0 times "$1$",2 times "$2$" and 0 times "$3$" which is the same as fed to machine so $2020$ is an automatic string.
  • $1210$  is an automatic string as the machine prints out "$1210$" which is the same string fed to machine.
You might be interested in
How does the browser display the same webpage whether you enter the URL or the IP address in the address bar? What system transl
ASHA 777 [7]
Your browser references a DNS server that translates a word or phrase of a url into an IP and then tells your browser what the IP address is so the browser can navigate to it. My google is not working atm sorry but you can google "what does DNS stand forin networking" and get an answer.
8 0
4 years ago
____ is necessary in any computer system because some resources such as memory, cpu, and dedicated devices must be exclusively a
bija089 [108]
The answer is the os or the operating sysetm because without it the computer can't even start up and run correctly

5 0
4 years ago
░▒▓█►─═ ℍᵒ ═─◄█▓▒░ (っ◔◡◔)っ ♥ how are you doing ♥
Lera25 [3.4K]
I’m not doing too hot
Stressing over school and I doesn’t help that I don’t understand somethings
8 0
3 years ago
.- Una tienda de vestidos de fiesta, ofrece un descuento a las personas
elena55 [62]

ajaaaieisslslqlqlqqpqlkek3k2l2ll2llllww

4 0
3 years ago
Evie clicks through her presentation slides and realizes they all have transition effects coming from the same location, from th
nalin [4]

Answer:

1) Choose Slide

2) Transition Tab

3) Transition To This Slide

4) Select New Transition

Explanation:

There are 4 main steps that Evie needs to take in order to accomplish this. First, she needs to choose the slide that she wants to apply the transition to. Secondly, she needs to click on the Transitions Tab at the top of the application. Thirdly, she needs to go to the "Transition to this Slide" section of the tab. Lastly, she needs to choose one of the available animation/transitions from the list of options. This will apply that transition effect to that slide, so that when she switches to that slide it performs the animation.

4 0
3 years ago
Other questions:
  • The technological advancements allowing for
    10·1 answer
  • This semester we looked at three languages (C++, Java and Python). One common rule in all three class checklists (for C++, Java
    11·1 answer
  • Using a subject directory, you locate a particular topic by clicking links through different levels. a. True b. False
    10·1 answer
  • An isotope of an element has:
    11·2 answers
  • What type of malware can, for example, locks up a user's computer and then display a message that purports to come from a law en
    9·1 answer
  • Write a sequence of statements that finds the first comma in the string line, and assigns to the variable clause the portion of
    13·1 answer
  • One interesting application of two-dimensional arrays is magic squares. A magic square is a square matrix in which the sum of ev
    8·1 answer
  • Plz answer me will mark as brainliest ​
    8·1 answer
  • Which changes the natural world? <br> technology <br> science <br> prototypes <br> feedback
    5·1 answer
  • define the physical components of hardware for a computer system,including identifying internal hardware devices(e.g. processor,
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!