Coding Tests with Answers
Test questions on the topic: Message encoding
The correct answer is highlighted in underlined italics after each question.
1. How many bits would it take to store the phrase “Tili-tili dough!” in a computer’s memory?
a) 16
b) 128
c) 32
Correct answer: b)
2. The maximum entropy value of a source that generates 16 different symbols is:
a) 4
b) 1
c) cannot be determined
Correct answer: a)
3. The compression coefficient for a source with probabilities
,
,
,
is equal to:
a) 0.875
b) 0.125
c) 1.338
Correct answer: a)
4. Shannon entropy has the property:
a) additivity
b) associativity
c) sociality
Correct answer: a)
5. The amount of information contained in two statistically dependent messages is estimated by the value:
a) Shannon entropy
b) conditional entropy
c) relative entropy
Correct answer: b)
1. Is the letter code
,
,
for the source
a prefix code?
a) yes
b) no
c) cannot be determined
Correct answer: b)
2. Is the letter code
,
,
for the source
separable?
a) yes
b) no
c) cannot be determined
Correct answer: b)
3. Is the letter code
,
,
uniquely decodable?
a) yes
b) no
c) cannot be determined
Correct answer: a)
4. Does Kraft’s inequality hold for the code
,
,
?
a) yes
b) no
Correct answer: a)
Test 5. After encoding the message with the letter-by-letter code
, the sequence 001001100 was obtained
.
The original message looked like this:
a) ![]()
b) ![]()
c) ![]()
Correct answer: a)
1. The average length of a code word of a letter-by-letter code
,
,
,
for a source
with a uniform probability distribution is equal to:
a) 2.75
b) 3
c) 1
The correct answer is a)
2. The redundancy of the letter code
,
,
,
for a source
with a uniform probability distribution is equal to:
a) 0
b) 0.75
c) 0.5
The correct answer is b)
3. Is the code
,
,
,
for a source
with a uniform probability distribution optimal?
a) yes
b) no
The correct answer is b)
4. Is the code
,
,
,
for a source
with probability distribution
,
,
,
optimal?
a) yes
b) no
The correct answer is a)
5. The average length of a code word of code
,
,
,
for a source
with probability distribution
,
,
,
is equal to:
a) 1.75
b) 2
c) 2.25
The correct answer is a)
Test 1. For the Shannon code, the following relation holds:
a) ![]()
b) ![]()
c) ![]()
The correct answer is b)
2. The length of the Shannon code word for a symbol
is determined from the ratio (
– probability of occurrence of the symbol
):
a) ![]()
b) ![]()
c) ![]()
The correct answer is a)
3. The average codeword length of the Fano code for a source
with a uniform probability distribution is:
a) 2.5
b) 2
c) 1.5
The correct answer is a)
4. Do Fano and Huffman codes coincide for a source
with a uniform probability distribution?
a) yes
b) no
c) both situations are possible
The correct answer is c)
Test 5. Do the average Fano and Huffman code lengths for a source
with a uniform probability distribution coincide?
a) yes
b) no
The correct answer is a)
1. Adaptive coding methods are used to encode messages generated by sources:
a) with known statistics
b) with unknown statistics
c) with uniform probability distribution
The correct answer is b)
2. To evaluate the statistics of the message source, the following is used:
a) sliding window
b) movable window
c) plastic window
The correct answer is a)
3. Adaptive Huffman code was proposed by:
a) D. Huffman
b) R. Gallagher
c) K. Shannon
The correct answer is b)
4. The adaptive “stack of books” code allows for good message compression:
a) with uniform distribution of symbols
b) with a large number of identical symbols
c) compresses any messages equally well
The correct answer is a)
Test No. 5. Is it necessary to know the probability distribution of the source symbols when encoding a message using the “stack of books” code?
a) yes
b) no
The correct answer is a)
1. Dictionary coding methods are used to encode messages generated by sources:
a) with known statistics
b) with unknown statistics and changing statistics
c) with uniform probability distribution
The correct answer is b)
2. The main types of dictionary methods of the LZ type are:
a) adaptive codes and optimal codes
b) sliding window codes and adaptive dictionary codes
c) adaptive Huffman code and codes using an adaptive dictionary
The correct answer is b)
3. In dictionary coding, the adaptive dictionary is used:
a) to store previously encountered combinations of symbols and their codes
b) to encode the message
c) to reduce coding redundancy
The correct answer is a)
Explore More IT Terms
#
- Using an integrating factor
- Equations in total differentials
- Bernoulli's equation
- Linear differential equations of the first order
- 10 Mixed C++ Challenges to Test Your Skills
- 11 Tricky Non-Technical Questions to Ask in a Recruiting Interview
- 50 Terms Every Programmer Should Know
- 52 Java Thread Interview Questions
- 7 Levels of Using the Zip Function in Python
- 7 Python Code Bugs You Need to Fix
- 70+ Free Resources for Learning Programming
A
- A Comprehensive Guide to HTML and CSS
- A Comprehensive Guide to MODX CMS
- A computer science question tests your ability to work with IP addresses and network masks
- A Guide to SQL Query Formatting for Beginners
- A/B testing
- Abstract Data Type (ADT)
- AES Encryption Algorithm: How It Works and Where It's Used
- Agile
- Algorithm
- Algorithm Analysis
- Algorithm Complexity-Key Points
- Algorithm complexity: deep parsing O(log n)
- Algorithm vs. Program
- Algorithms and Data Structures in C#
- An overview of the C # programming language
- An overview of the Python programming language
- Anaconda Python
- Analysis of graphs and adjacency matrices question
- Android
- Android App Bundle
- Android SDK
- Angular
- Ansible
- Apache
- Apache Airflow
- Apache Kafka
- Apache Tomcat
- App Store
- AppCode
- Applications of microcontrollers: From simple circuits in electronics to complex systems
- Applications of the derivative
- Arduino: How to Program It: Basics for Beginners
- Array-based stack
- ArrayList
- ASCII
- ASP.NET
- Assembly Language Lessons
B
C
- C++ Lessons
- Cache
- Calculating Memory Capacity
- Character sets and encodings
- Characteristics of a good Algorithm
- Circular singly linked list
- Coding Tests with Answers
- Combinational Circuits Solved Questions
- Compiler
- Complexity of algorithms-Tutorial
- Computer Science Fundamentals Test with Answers (47 questions)
- Computer science tests with answers (More than 100 Questions)
- Constants
- Creating a Table in HTML
- Creating Forms in HTML
- Creating Lists
- Cybernetics and informatics
- Cycles
D
- Data Analytics: applications of data analysis in companies
- Data Engineer - Who is it, what does a data engineer do, and an overview of the profession
- Data modeling: what it is, types, and process steps.
- Data preprocessing: a complete guide for beginners and professionals.
- Data structure
- Data Structures and Algorithms (DSA)
- Data types vs. Data structures
- Database Tests with Answers
- Deep Learning
- Defining Aliases
- Defining Arrays
- Deque
- Detailed articles and tutorials on PHP
- Developing a Website from Scratch
- Differential Equations
- Differentiation of functions
- Digital data: understand the importance of this asset for businesses.
- Double integrals
- Doubly linked lists
- DSA Tutorial
E
F
G
H
- Handling errors and exceptions
- Heads or Tails? How Probability Theory Is Used in IT
- History of the development of computer science
- Homogeneous equations
- Homogeneous vs. non-homogeneous structures
- How to effectively organize your workflow
- How to Learn Java: Tips for Beginner Developers
- How to Learn PHP: A Beginner's Guide
- How to Use S3 Storage in Kubernetes with CSI
- HTML
- HTML and CSS: Definition, Application, and Operating Principles
- HTML and CSS. Layout from Scratch: What to Learn, Where to Learn, and How Long Will It Take?
- HTML Frame Structure
- HTML Link Formatting
- HTML Quizzes with Answers
I
- if..else construction
- Infinite sequences and series
- Information properties
- Inheritance in Java: A Complete Guide to Principles and Implementation
- Inserting an Image
- Integration of functions
- Interactive Python Tutorial – Learn Programming from Scratch
- Interpreter
- Interview Problem: Finding a Deleted Element in O(N)
- Interview Scare: The FizzBuzz Challenge
- Introduction to C++
- Introduction to Machine Learning
- Introduction to Networking | Network Fundamentals Part 1
- Introduction to Number Systems (Binary, Octal, Hexadecimal) | Math for CS Foundations #1
- IT Specialist Resume (CV)
J
K
L
M
- Machine Learning
- Machine Learning Basic Tool: NumPy
- Machine Learning Basic Tool: Pandas
- Machine Learning Mathematics
- Mathematics for programmers: what is really needed?
- MD5 encryption algorithm: What is it and why is it needed?
- Microcontroller and Microprocessor - what's the difference?
- ML Engineer: Who They Are, What They Do, How Much They Earn, and How to Become a Neural Network Specialist
- Monte Carlo Simulation: How It Works and What It's For
O
P
- PHP lessons
- Private DNS server and its configuration
- Program code
- Programmer's Dictionary
- Programming
- Programming with pseudocode
- Python Code Formatting Guide: PEP8
- Python for data analysis: how to do it and main libraries
- Python Lessons
- Python Superstar: 5 Ways to Use the * Operator
- Python vs. Julia: Should You Replace Python with Julia?
R
S
- SFML Graphics Library Tutorials
- Sorting Algorithms in Programming: Types, Descriptions, and Comparisons
- SQL commands: see what they are, what the main ones are + examples
- SQL Interview Questions and Tasks
- SQL Lessons
- SQL Stored Procedures
- SQL Syntactic Sugar: The COALESCE Function
- Stack
- Start in analytics: Python or R
- Static vs. dynamic data structures
- Statistical analysis: importance for decision making.
- String formatting in Python
- Structure of computer science
- Swift Lessons
- switch/match construct
- Syntax
T
- Terms in programming
- Text and paragraph formatting tags
- The Complete Guide to Bootstrap
- The Complete Guide to JavaScript
- The concept of information and its transmission
- The Future of Python: Key Trends and Insights from Global Researc
- The Infrastructure of Code: A Complete Guide to Repositories for Languages, Frameworks, and Compilers
- The pip package manager in Python
- The role of informatization in the development of society
- Transfers
- Tricky Java Questions Often Asked in Interviews
- Tutorials / Articles
- TypeScript: What It Is and Why Developers Need It
W
- What are databases, and why do they need DBMS and SQL?
- What do Linux distributions consist of?
- What is .NET and what is it used for?
- What is a data structure?
- What is a GPU in a computer, in simple terms?
- What is a quantum computer: 100,500 problems in one second
- What Is an Algorithm?
- What is Arduino: How it Works and the Platform's Capabilities
- What is Big Data? Introduction, Types, Characteristics, and Examples
- What is FizzBuzz Challenge?
- What is Golang and what is it used for?
- What is Haskell and what is it used for?
- What is Kotlin and what is it used for?
- What is Linux? The History of Linux
- What is machine learning, and how does it work?
- What is Power BI: everything about the data analytics software
- What is recursion, recursive and iterative process in programming?
- What is the C++ programming language?
- What is the OSI Model: A Complete Explanation of the Seven Layers and Their Role in Networking
- What's the difference between x86 and ARM processors?
- Where to start learning the C programming language?
- Which Linux distribution should you choose? A Linux distribution overview
