Some announcements. Announcements for game due (via ) on Wednesday, March 15 Homework 6 due on March 15 Exam 3 on March 17

Similar documents
ENEE x Digital Logic Design. Lecture 3

Data Structures and Algorithms

System. Entries. TATTS CARD THE SAFER WAY TO PLAY Apply or find out more at your nearest Tatts outlet, or visit tatts.com today.

The Data Link Layer. CS158a Chris Pollett Feb 26, 2007.

Error Detection And Correction

ECE 333: Introduction to Communication Networks Fall Lecture 6: Data Link Layer II

PART III. Data Link Layer MGH T MGH C I 204

Chapter 17: Information Science Lesson Plan

From last time to this time

FAULT TOLERANT SYSTEMS

The Gray Code. Script

UNIT 7A Data Representation: Numbers and Text. Digital Data

Error-Correcting Codes

Chapter 16 Identification Numbers Understand the purpose of a check digit. Know what a bmod

Lesson 9: An Application of Linear Equations

Basics of Information Worksheet

Error Detection. Hamming Codes 1

CS 161 Fall 2015 Final Exam

Poster ID 19 Binomial vs. Hypergeometric Yvanny Chang What s the difference?

CSE 123: Computer Networks

Lotto007 XP Manual Getting Started Quick Start Welcome to Lotto007 XP Installing Lotto007 XP Starting Lotto007 XP System Requirements Working with

Definition. A set is a collection of objects. The objects in a set are elements.

Chapter 10 Error Detection and Correction 10.1

Game Guide. Keno Game Guide

Chapter Three. Digital Components

Announcement. (CSC-3501) Lecture 3 (22 Jan 2008) Today, 1 st homework will be uploaded at our class website. Seung-Jong Park (Jay)

Errors. Chapter Extension of System Model

Error Checking Codes

Manual Entry Enter/Edit dates and draws in your database. Import.CSV Automatically import dates and draws into the currently open database.

Error Correction continued and start on FPGA architecture

CSCI-1680 Link Layer Reliability Rodrigo Fonseca

CS254 Network Technologies. Lecture 2: Network Models & Error Detection and Correction. Dr Nikos Antonopoulos

QED Q: Why is it called the triangle inequality? A: Analogue with euclidean distance in the plane: picture Defn: Minimum Distance of a code C:

A Random Walk through CS70

Graph theory. Po-Shen Loh. June We begin by collecting some basic facts which can be proved via bare-hands techniques.

392D: Coding for the AWGN Channel Wednesday, March 21, 2007 Stanford, Winter 2007 Handout #26. Final exam solutions

Finite Math - J-term Homework. Section Inverse of a Square Matrix

CS1800 Discrete Structures Fall 2017 October 25, CS1800 Discrete Structures Midterm Version B

Math Summer 2012

CMSC 2833 Lecture 18. Parity Add a bit to make the number of ones (1s) transmitted odd.

Solutions to Final. Solutions to Final. May 18th CS170 David Wolfe ALWAYS TRUE SOMETIMES TRUE NEVER TRUE

Hawraa Abbas Almurieb. Axiomatic Systems

Lotto Pro User's Manual

GT1200 RETAILER REFERENCE GUIDE

Combinatorics Seminar

Final Exam. Introduction to Artificial Intelligence. CS 188 Spring 2010 INSTRUCTIONS. You have 3 hours.

CS/MA 109 Fall Wayne Snyder Computer Science Department Boston University

Final Exam CS 520: Introduction to Artificial Intelligence Fall, 1999

CMPSCI611: The SUBSET-SUM Problem Lecture 18

CHAPTER 17 INFORMATION SCIENCE. Binary and decimal numbers a short review: For decimal numbers we have 10 digits available (0, 1, 2, 3, 9) 4731 =

Let s get started. Game guide

4. Use a loop to print the first 25 Fibonacci numbers. Do you need to store these values in a data structure such as an array or list?

Solution : a) C(18, 1)C(325, 1) = 5850 b) C(18, 1) + C(325, 1) = 343

Copyright of the University of East Anglia Version 1

Lecture 5: More Examples/Applications of Quasirandom Graphs

Announcements. CS 188: Artificial Intelligence Spring Generative vs. Discriminative. Classification: Feature Vectors. Project 4: due Friday.

CS1800 Discrete Structures Final Version A

STUDENT NUMBER: MATH Final Exam. Lakehead University. April 13, Dr. Adam Van Tuyl

2 Geometry Solutions

CS101 Lecture 04: Binary Arithmetic

Chapter 10 Error Detection and Correction. Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

CS1132 Fall 2009 Assignment 1. 1 The Monty Hall Dillemma. 1.1 Programming the game

T325 Summary T305 T325 B BLOCK 4 T325. Session 3. Dr. Saatchi, Seyed Mohsen. Prepared by:

Final Exam May 8, 2018

Discrete Mathematics and Probability Theory Fall 2013 Midterm #2

Wednesday, April 25, Discs RAID: Introduction Error detection and correction Error detection: Simple parity Error correction: Hamming Codes

Graphs and Puzzles. Eulerian and Hamiltonian Tours.

CS1800 Discrete Structures Fall 2017 October 25, CS1800 Discrete Structures Midterm Version B

Final. Name: TA: Section Time: Course Login: Person on Left: Person on Right: U.C. Berkeley CS170 : Algorithms, Fall 2013

Section Sets and Set Operations

UCSD ECE154C Handout #21 Prof. Young-Han Kim Thursday, June 8, Solutions to Practice Final Examination (Spring 2016)

Lecture 3, Review of Algorithms. What is Algorithm?

Exam 3 Practice Problems

CS/ECE 438: Communication Networks for Computers Spring 2018 Midterm Examination Online

A Bullseye. Problem. Output. For each dataset, print a line of the form: SCORE: N to M, PLAYER P WINS. Or: SCORE: N to M, TIE.

Approved establishments, which must have a valid liquor license, will pay a $500 annual license fee to offer KENO 603, according to the legislation.

Chomp the Graph. Research. treet. road. Sam Magura, Vitchyr Pong, Elliot Cartee, Kevin Valakuzhy. Scientific

Projective geometry and the extended Euclidean plane

Communication Fundamentals in Computer Networks

CSCI-1680 Link Layer Reliability John Jannotti

Brief History. Graph Theory. What is a graph? Types of graphs Directed graph: a graph that has edges with specific directions

Figure 1: Two polygonal loops

Intro to Contemporary Math

Supervised Learning with Neural Networks. We now look at how an agent might learn to solve a general problem by seeing examples.

Advanced Computer Networks. Rab Nawaz Jadoon DCS. Assistant Professor COMSATS University, Lahore Pakistan. Department of Computer Science

12/2/2016. Error Detection May Not Be Enough. ECE 120: Introduction to Computing. Can We Use Redundancy to Correct Errors?

GSE Scale Systems M660 CUSTOM TRANSMIT

Statistical Computing

EE 368. Weeks 5 (Notes)

EECS 203 Lecture 20. More Graphs

CSCI-1680 Link Layer I Rodrigo Fonseca

CSN Telecommunications. 5: Error Coding. Data, Audio, Video and Images Prof Bill Buchanan

DAILY BONUS GAMES. $5K

LING 388: Computers and Language. Lecture 5

AM 221: Advanced Optimization Spring 2016

5 Binary Coding In Noisy Channels

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two 26 February 2014

Click the mouse button or press the Space Bar to display the answers.

Graph Algorithms (part 3 of CSC 282),

Euler and Hamilton paths. Jorge A. Cobb The University of Texas at Dallas

Transcription:

Hamming Codes

Some announcements Announcements for game due (via email) on Wednesday, March 15 Homework 6 due on March 15 Exam 3 on March 17

Today s Goals Learn about error correcting codes and how they work. Construct Hamming Codes and use them to transmit simple messages. Examine how these codes are relevant to optimal strategies for selecting lottery tickets.

Hamming Codes Hamming codes are a way to transmit messages that may contain errors and correct for them. Note: this is different then transmitting messages secretly (RSA), though the two may be used together. Hamming codes are written in bits. A bit is a digit which is either zero or one. This is also called binary or mod 2. A string is a sequence of bits. Attached to each string in a Hamming code is an additional parity check string (also in bits).

Hamming Codes Example We begin with a 4-bit string. Call the string a1a2a3a4. Three check digits, c1, c2, and c3, will be attached to the 4-bit string to produce a 7-bit string. c1, c2, and c3 are chosen as follows: { 0 if a1 + a2 + a3 is even c1 = 1 if a1 + a2 + a3 is odd { 0 if a1 + a3 + a4 is even c2 = 1 if a1 + a3 + a4 is odd { 0 if a2 + a3 + a4 is even c3 = 1 if a2 + a3 + a4 is odd

Hamming Codes-Construction The sums shown above are called parity check sums - so named because their purpose is to ensure that the sum of various components of the encoded message is even. For example, c1 is defined in so that a1 + a2 + a3 + c1 is even

Example Construct the Hamming code word corresponding to the 4 bit string 0101 a1 + a2 + a3 = 0 + 1 + 0 is odd so c1 = 1 a1 + a3 + a4 = 0 + 0 + 1 is odd so c2 = 1 a2 + a3 + a4 = 1 + 0 + 1 is even so c3 = 0. The Hamming code word corresponding to 4-bit string 0101 is 0101110. Every possible sequence of 7 bits is either a correct message (corresponds to a Hamming code word) or contains exactly one correctable error.

Error Detection and Error Correction Sometimes, due to noisy transmission, code words contain errors. The Hamming Code is designed to detect and correct errors in 4-bit transmissions. Suppose a message is received as 1111010. Is this a Hamming code word? If not, what word should it have been?

Error Detection and Error Correction In order to determine if the message received is a Hamming Code word, we simply scan the code. If it is one of the 16 code words, we know the message is received as sent. If it is not among the 16 code words, we compare the message received with each code word and compute the Hamming distance for each. The Hamming distance is defined as the number of times a bit in the received message differs from the bit in the code word.

Example Compare the code words 0001011 with 1111010. These words differ in 4 positions. We say the Hamming distance is 4.

Error Detection and Error Correction Once all the distances are computed, we locate the Hamming code which produces the shortest distance for 1111010. We also call this the nearest code word. This code will be the code used to correct the transmission error. If there is more than one shortest distance, we do not correct the message.

The Transylvania Lottery This game is like a usual pick 3 from the numbers 1 through 7 (no repeats) with a jackpot for hitting all three and a smaller prize for hitting two out of three (deuce).

The Transylvania Lottery How many possible combinations are there of tickets? 7C 3 = 7! 3!(7 3)! = 7 6 5 3 2 = 35. Say you are going to buy seven tickets. What are your chances of hitting the Jackpot? 7 35 = 1 5 = 20%. This is true no matter what tickets you choose. Say you wanted to maximize the number of deuces? Does it matter what tickets you select? Yes!

The Fano Plane This is the Fano plane. It is an example of a finite geometry (seven points). It satisfies two rules: (1) every pair of points is contained in exactly one common line and (2) every pair of lines contains exactly one common point.

The Fano Plane There are exactly 7 lines in the Fano plane. They are: 124, 135, 176, 236, 257, 437, 456 These are exactly the numbers we should pick for the Translyania Lottery.

The Transylvania Lottery Why these numbers? 124, 135, 176, 236, 257, 437, 456. Try picking any three numbers. There are either three deuces or no deuces. But, if there are no deuces then we win the jackpot!

Hamming Codes What does this have to do with Hamming codes? Here s another codebook from the Ellenberg text: 000 0000000 001 0010111 010 0101011 011 0111100 101 1011010 110 1100110 100 1001101 111 1110001 This one satisfies a special property that no code with one error is close to two different codes from the codebook so we can always figure out the correct message from Hamming distance.

Hamming Codes and the Fano Plane Say we translate each line in the Fano Plane to binary. We put a 0 in the n spot if point n is on the line and a 1 if it is not. Then the line 124 is 0010111. The line 257 is 1011010. You can check that each line corresponds to one code from the codebook.