![darkghostmist](/avatars/15952.jpg)
darkghostmist
11.11.2019 •
Mathematics
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).
Solved
Show answers
More tips
- F Food and Cooking How Many Grams Are In a Tablespoon?...
- L Leisure and Entertainment Carving: History and Techniques for Creating Vegetable and Fruit Decorations...
- P Photography and Videography How to Choose the Perfect Photo Paper for Your Images?...
- H Health and Medicine What vaccines do children need?...
- H Health and Medicine Reasons for the Appearance of Warts: Everything You Need to Know...
- A Art and Culture How to Learn Screaming: Step-by-Step Guide for Beginners...
- H Health and Medicine Contraceptive Pills After 35: The Importance Of Choosing The Right Medication...
- C Computers and Internet How to Choose a Monitor?...
- H Horoscopes, Magic, Divination Where Did Tarot Cards Come From?...
Answers on questions: Mathematics
- M Mathematics Which of the following is an even function? f(x) = x1 Of(x) = x2 - 1 Of(x) = -3x O Rx) = 3/8...
- M Mathematics Anumber is 3 less than another. the sum of the numbers is 5. find the numbers...
- M Mathematics The weights of newborn baby boys born at a local hospital are believed to have a normal distribution with a mean weight of 3907 grams and a variance of 444,889. Of a newborn...
- C Chemistry Give oxidation and reduction half-reactions to this equation...
- S SAT We consume for various reasons. sometimes we buy in order to reduce suffering (medicine), or to give pleasure (movies), or to feel safer (a lock), to become wiser (education),...
- M Mathematics You make $10 an hour. you work 40 hours a week and 5 hours a week overtime. overtime is paid at time-and-a-half. how much will you make in a year?...
- S Spanish ¿por qué se viste rosa con vestido? rosa le viste con vestido porque va a una fiesta. rosa se viste con vestido porque va a una fiesta. rosa le vista con vestido porque...
Ответ:
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
) and an even number of 1's (say
). The string '1s1' has the following numbers of zeroes and ones:
Zeroes: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
is odd) and an even number of 1's (because
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 (
) and an even number of 1's (say
).
Now, how many 0's and 1's are there in the string 's0t'?
Zeroes: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
is the sum of three odd numbers, and thus odd) and an even number of 1's (because
is the sum of two even numbers, and thus even).
Ответ:
Exponential: 64
Linear: 17
Explanation:
I know this is right because I got it wrong and it showed me the answer.