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
Why would you use cell names in formulas instead of numbers?
ehidna [41]
<span>It is easier to remember cell names. not sure tho</span>
5 0
3 years ago
The WordPress Widgets submenu is located where on the WordPress site?
wel

Answer:

Appearances

Explanation:

In your dashboard, click on Appearance → Customize → Widgets. Choose the location where you'd like to place the widget on your site. Common options here include the Footer and Sidebar, but this may be different depending on your theme..

Go to Appearance > Widgets in the WordPress Administration Screens. Choose a Widget and either drag it to the sidebar where you wish it to appear, or click the widget, (select a destination sidebar if your theme has more than one) and click the Add Widget button.

[ RevyBreeze ]

4 0
2 years ago
A rectangular range of cells with headings to describe the cells' contents is referred to as a?
Anastasy [175]

Answer:

Table

Explanation:

A table of information is a set of rows and columns. It is a way of displaying information.

For example if we want to organize the information in the rows and columns then we should make the table. These rows and columns are formed cells and cells gathers to make a table.

<em>A rectangular range of cells with headings to describe the cells' contents is referred to as a </em><em><u>Table.</u></em>

8 0
3 years ago
How will you convert a decimal fraction into its hexadecimal form by a process Of
elena-14-01-66 [18.8K]
To make a fraction a decimal you have to divide the denominator and the numerator
<span />
7 0
3 years ago
Read 2 more answers
To create an effective study schedule, a student must
Delicious77 [7]
1)breaks for snacks
2)no distractions
3)make sure they have everything
3 0
4 years ago
Read 2 more answers
Other questions:
  • Which of the following refers to applications and technologies that are used to gather, provide access to, and analyze data and
    8·2 answers
  • Which company has the comparative advantage in producing large tubes of toothpaste?
    10·2 answers
  • Emily has to create an audio-visual presentation on animated movies. Which input device will she be LEAST likely to use while cr
    6·1 answer
  • Which standard is commonly used on the Internet to represent non-numeric data?
    14·1 answer
  • Which two hardware features would a technician monitor within the bios if a computer was suspected of overheating?
    7·1 answer
  • Write a program that calculates the average rainfall for three months. The program should ask the user to enter the name of each
    5·1 answer
  • When you sit for a typing test, what is the first thought that crosses your mind?
    13·2 answers
  • ap csp The local, remote, and upstream _______ can each have multiple ___ _____. When a participant in a collaborative group on
    5·1 answer
  • Which one of the following devices would you choose to meet those requirements?
    10·2 answers
  • Select the correct answer from each drop-down menu. Susan has decided to develop a website on a WYSIWYG editor. What kind of set
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!