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
Anna007 [38]
3 years ago
13

Consider the following inductive definition of an approved bit string of 0's and 1's.Foundation: The bit string 0 is an approved

bit string.Constructor: If s and t are approved bit strings, then so are 1s1 and s0t.Use structural induction to show that every approved bit string consists of an odd number of 0's and an even number of 1's. Make sure to indicate what P(n) is (i.e., the predicate you are proving holds true for all natural numbers n).
Mathematics
1 answer:
Alinara [238K]3 years ago
3 0

As for every proof by induction, we start with the base case: the string '0' consists of an odd number of 0's and an even number of 1's, because there is one 0 and there are no 1s (and zero is even).

Now, if we let n represent the number of iterations, we have that the initial string '0' is the 0-th iteration. So, P(n) is the claim "the string built with the n-th iteration consist of an odd number of 0's and an even number of 1's", and we have just proven P(0).

Once the base case is proven, we can assume that all proposition from P(0) to P(n-1) are true.

We can build the n-th iteration in two ways:

CASE 1: The n-th iteration is in the form 1s1.

Since s is a string obtained at some previous iteration, we can assume that is consists of an odd number of 0's (say s_0) and an even number of 1's (say s_1). The string '1s1' has the following numbers of zeroes and ones:

  • Zeroes: s_0
  • Ones: s_1+2

In fact, starting from s, we only added two 1's (at the beginning and the end). So, '1s1' also has an odd number of 0's (because s_0 is odd) and an even number of 1's (because s_1+2 is the sum of two even numbers).

CASE 2: The n-th iteration is in the form s0t.

Since s and t are strings obtained at some previous iteration, we can assume that they consist of an odd number of 0's (say s_0,\ t_0) and an even number of 1's (say s_1,\ t_1).

Now, how many 0's and 1's are there in the string 's0t'?

  • Zeroes: s_0+t_0+1
  • Ones: s_1+t_1

In fact, starting from s and t, we only added one 0 (between the two original strings). So, 's0t' also has an odd number of 0's (because s_0+t_0+1 is the sum of three odd numbers, and thus odd) and an even number of 1's (because s_1+t_1 is the sum of two even numbers, and thus even).

You might be interested in
There are 120 seats in a row. What is the fewest number of seats that must be occupied so the next person to be seated must sit
Zanzabum
Let's name the seats 1 through 120.
Occupy seat 2.
Leave 2 empty seats. You can't leave 3 empty seats because then the middle seat of the three empty seats is not adjacent to an occupied seat. You can leave only 2 seats empty. Seats 3 and 4 are empty.
Occupy seat 5.
Leave 2 empty seats. Seats 6 and 7 are empty.
Keep on going like this to the end, occupying 1 seat and leaving 2 seats empty.
Now we need to find the number of occupied seats.
Think of the entire row being divided into groups of 3 seats.
The middle seat of each group is occupied.
Since there are 120 seats in the row, there are 40 groups of 3 seats whose middle seat is occupied. There are 40 middle seats, so there are 40 occupied seats.

Answer: 40 seats
4 0
4 years ago
Help on this will mark brainalist!
vovangra [49]

Answer:

y = 2x - 10

Step-by-step explanation:

Slope-intercept form is...

y = mx + b

To get the slope, you have to use the formula...

(y2 - y1) / (x2 - x1)

In this case,

y2 = 2

y1 = 10

x2 = 6

x1 = 10

So...

(2 - 10) / (6 - 10)

= -8 / -4 = 2

Therefore, slope is 2

y = 2x + b

Using any of the two x and y value provided, input the values in the equation

(I'm going to use 6,2)

2 = 2(6) + b

2 = 12 + b

b = -12 + 2

b = -10

Put this all together...

y = 2x - 10

Hope this helps :)

Let me know if there are any mistakes!!

3 0
3 years ago
Write 2 eggs is to 3 cups of flour as 12 eggs is to 18 cups of flour as a proportion.
Yuliya22 [10]
The answer is <span>A. 2 eggs / 3 cups of flour = 12 eggs / 18 cups of flour because 2 x 18 = 3 x 12 = 36.</span>
6 0
4 years ago
Which input value produces the same output value for the
USPshnik [31]

Answer:

x = 4

Step-by-step explanation:

The 2 graphs have the same output, y = 3 at the point of intersection

This occurs when the input is x = 4

8 0
3 years ago
Read 2 more answers
in a fish tank 8/11 of the fish have red stripes on them. If 16 of the fish have red stripes,how many total fish are in the tank
Margarita [4]
There are 22 total fish in the tank because 8 got doubled so 11 would also have to get doubled
6 0
4 years ago
Read 2 more answers
Other questions:
  • 5. What is the probability of rolling an odd number or a number greater than 2 on a die?​
    9·1 answer
  • What is the answers to the following questions?
    6·1 answer
  • Mario is making dinner for 6 people. Mario buys 8 containers of soup. Each container is 12 ounces. If
    6·1 answer
  • Standard coffee mug has a capacity of 16 fluid ounces.
    10·1 answer
  • Is the distance between point R(-1,7) and point T(-7, 7)?
    5·1 answer
  • The GOAL of solving equations is to get the variable by itself on one side of the equation and a number on the other side of the
    6·1 answer
  • The Stock Market nadia is a stockbroker. Earns 14​% commission each week. Last​ week, sold ​7200$ worth of stocks. How much did
    7·1 answer
  • Which function's graph has a y-intercept of 2?
    6·1 answer
  • Need some help with these questions ASAP please
    7·1 answer
  • Kevin has total of 7590 as currency notes in the denominations of 750, 320 and 10. The ratio of the number of 50 notes and 720 n
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!