Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. (a) A palindrome is a string that is the same backwards and forwards. (12 points) i. How many binary palindromes are there of length

image text in transcribed

1. (a) A palindrome is a string that is the same backwards and forwards. (12 points) i. How many binary palindromes are there of length 2n? ii. How many bits would the most efficient encoding of such strings use? in terms of n.) iii. Develop your own encoding/decoding algorithm where the code uses this number of bits. (Please give a brief description of how it works on an arbitrary input.) iv. Use your encoding to encode the following strings: 0011001100 . 0110110110 . 010010 v. Use your decoding to decode the following strings: (put "not decodable" if you can't decode the string.) 110 . 101 .000 (b) A ternary string is a string consisting of the characters 0,1 and 2. (12 points) i. How many n-length ternary strings are there that avoid 00, 11, 22? ii. How many bits would the most efficient encoding of such strings use? (in terms of n.) iii. Develop your own encoding/decoding algorithm where the code uses this number of bits. (Please give a brief description of how it works on an arbitrary input.) iv. Use your encoding to encode the following strings: 012102 21212 . 010201 v. Use your decoding to decode the following strings: (put "not decodable" if you can't decode the string.) 11000 . 10111 . 00000 1. (a) A palindrome is a string that is the same backwards and forwards. (12 points) i. How many binary palindromes are there of length 2n? ii. How many bits would the most efficient encoding of such strings use? in terms of n.) iii. Develop your own encoding/decoding algorithm where the code uses this number of bits. (Please give a brief description of how it works on an arbitrary input.) iv. Use your encoding to encode the following strings: 0011001100 . 0110110110 . 010010 v. Use your decoding to decode the following strings: (put "not decodable" if you can't decode the string.) 110 . 101 .000 (b) A ternary string is a string consisting of the characters 0,1 and 2. (12 points) i. How many n-length ternary strings are there that avoid 00, 11, 22? ii. How many bits would the most efficient encoding of such strings use? (in terms of n.) iii. Develop your own encoding/decoding algorithm where the code uses this number of bits. (Please give a brief description of how it works on an arbitrary input.) iv. Use your encoding to encode the following strings: 012102 21212 . 010201 v. Use your decoding to decode the following strings: (put "not decodable" if you can't decode the string.) 11000 . 10111 . 00000

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Database Systems For Integration Of Media And User Environments 98

Authors: Yahiko Kambayashi, Akifumi Makinouchi, Shunsuke Uemura, Katsumi Tanaka, Yoshifumi Masunaga

1st Edition

9810234368, 978-9810234362

More Books

Students also viewed these Databases questions

Question

Describe the minimal group paradigm.

Answered: 1 week ago

Question

What is job rotation ?

Answered: 1 week ago