Question

3. Restricted Bitstrings An n-bit binary string is a sequence of length n over the alphabet...

3. Restricted Bitstrings

An n-bit binary string is a sequence of length n over the alphabet {0,1}.

  1. How many n-bit binary strings are there?
  2. How many n-bit binary strings b1,…,bn are there such that b1b2≠00? In other words, how many n-bit binary strings don't begin with 00?
  3. How many n-bit binary strings b1,…,bn are there such that b1b2≠00 and b2b3≠11?
  4. How many n-bit binary strings b1,…,bn are there such that b1b2≠00 and such that b2b3≠01?

Homework Answers

Answer #1

1. How many n-bit binary strings are there?
n places can have either 0 or 1
2^n

2. How many n-bit binary strings b1,…,bn are there such that b1b2≠00? In other words, how many n-bit binary strings don't begin with 00?
b1 b2 = 11 or 01 or 10 only
For rest of the n-2 places it can be either 0 or 1
3 * 2^(n-2)

3. How many n-bit binary strings b1,…,bn are there such that b1b2≠00 and b2b3≠11?
b1 b2 = 11 or 01 or 10 only
Case 1: 11 then b3 = 0 -> 2^(n-3)
Case 2: 01 then b3 = 0 -> 2^(n-3)
Case 2: 10 then b3 = 0 or 1 -> 2.2^(n-3)
2^(n-3) + 2^(n-3) + 2.2^(n-3)
= 4. 2^(n-3)
= 2^2 2^(n-3)
= 2^(n-3+2)
= 2^(n-1)

4. How many n-bit binary strings b1,…,bn are there such that b1b2≠00 and such that b2b3≠01?
b1 b2 = 11 or 01 or 10 only
Case 1: 11 then b3 = 0 or 1 -> 2.2^(n-3)
Case 2: 01 then b3 = 0 or 1 -> 2.2^(n-3)
Case 3: 10 then b3 = 0 -> 2^(n-3)
2^(n-3) + 2.2^(n-3) + 2.2^(n-3)
= 5 * 2^(n-3)

--------------------------------------
Hit the thumbs up if you are fine with the answer. Happy Learning!

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
An n-bit binary string is a sequence of length n over the alphabet {0,1}. How many...
An n-bit binary string is a sequence of length n over the alphabet {0,1}. How many n-bit binary strings are there? How many n-bit binary strings b1,…,bn are there such that b1b2≠00? In other words, how many n-bit binary strings don't begin with 00? How many n-bit binary strings b1,…,bn are there such that b1b2≠00 and b2b3≠11? How many n-bit binary strings b1,…,bn are there such that b1b2≠00 and such that b2b3≠01?
n digit string of length n over alphabet {0,1, . . . ,9} a. How many...
n digit string of length n over alphabet {0,1, . . . ,9} a. How many n digit strings are there with at least one 1? b. many n digit are there with EXACTLY one 1? PLEASE ANSWER BOTH AND INCLUDE THE FACT THAT THE STRING IS OVER ALPHABET {0,1,2,3,4....9}
n digit string of length n over alphabet {0,1, . . . ,9} How many n...
n digit string of length n over alphabet {0,1, . . . ,9} How many n digit strings are there with at least one 1? How many n digit are there with EXACTLY one 1?
1. (4 pts) Consider all bit strings of length six. a) How many begin with 01?...
1. (4 pts) Consider all bit strings of length six. a) How many begin with 01? b) How many begin with 01 and end with 10? c) How many begin with 01 or end with 10? d) How many have exactly three 1’s? 2. (8 pts) Suppose that a “word” is any string of six letters. Repeated letters are allowed. For our purposes, vowels are the letters a, e, i, o, and u. a) How many words are there? b)...
Strings The example program below, with a few notes following, shows how strings work in C++....
Strings The example program below, with a few notes following, shows how strings work in C++. Example 1: #include <iostream> using namespace std; int main() { string s="eggplant"; string t="okra"; cout<<s[2]<<endl; cout<< s.length()<<endl; ​//prints 8 cout<<s.substr(1,4)<<endl; ​//prints ggpl...kind of like a slice, but the second num is the length of the piece cout<<s+t<<endl; //concatenates: prints eggplantokra cout<<s+"a"<<endl; cout<<s.append("a")<<endl; ​//prints eggplanta: see Note 1 below //cout<<s.append(t[1])<<endl; ​//an error; see Note 1 cout<<s.append(t.substr(1,1))<<endl; ​//prints eggplantak; see Note 1 cout<<s.find("gg")<<endl; if (s.find("gg")!=-1) cout<<"found...
1. What is an ISP (Integrated Service Provider) for supply chains? (1 point) A. A consultant...
1. What is an ISP (Integrated Service Provider) for supply chains? (1 point) A. A consultant agency which integrates the supply chain for companies B. A 2 PL or a 3PL, but not a 4PL C. A company supplying transportation and warehousing services D. A logistics service company specialized in suppling VAS (value added services) 2. What characterizes a 4 PL? (1 point) A. They are non-asset based and provides integrated services primarily supplied by asset based providers, for example...
What tools could AA leaders have used to increase their awareness of internal and external issues?...
What tools could AA leaders have used to increase their awareness of internal and external issues? ???ALASKA AIRLINES: NAVIGATING CHANGE In the autumn of 2007, Alaska Airlines executives adjourned at the end of a long and stressful day in the midst of a multi-day strategic planning session. Most headed outside to relax, unwind and enjoy a bonfire on the shore of Semiahmoo Spit, outside the meeting venue in Blaine, a seaport town in northwest Washington state. Meanwhile, several members of...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT