Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SHOULD BE IN JAVA :) Problem 1. Construct a hash function as follows. The input of the hash function is English which include 26 letters

SHOULD BE IN JAVA :)image text in transcribed

Problem 1. Construct a hash function as follows. The input of the hash function is English which include 26 letters and the space. So we will compute in Z27. The input text will be divided into blocks of 25 letters, the output will be 5 letters. Use an array OUT [5] to store the output. Initialize OUT [5] with all O's. The hash process include 3 rounds: Round 1 Write the 25 letters as a row-wise 5 x 5 block text and covert it to numbers. For example, if the input is: "abcdefghi jklmnopqrstuvwx, then we have a b c d e 0 1 2 3 4 5 6 7 8 26 jkim 9 10 11 12 13 opa 14 15 16 17 18 t uvw 19 20 21 22 23 ol n S r 1 Add numbers in ith column in 227 and plus the resulting number to OUT [i] to update the value of OUT[i]. In this example, the updated value will be [20, 25, 3, 8, 3]. (e.g., 0+5+ 9 + 14 + 19 = 20 (mod 27). Since the previous value of UOT [0] = 0, the updated value is 0 + 20 = 20 (mod 27).). Problem 1. Construct a hash function as follows. The input of the hash function is English which include 26 letters and the space. So we will compute in Z27. The input text will be divided into blocks of 25 letters, the output will be 5 letters. Use an array OUT [5] to store the output. Initialize OUT [5] with all O's. The hash process include 3 rounds: Round 1 Write the 25 letters as a row-wise 5 x 5 block text and covert it to numbers. For example, if the input is: "abcdefghi jklmnopqrstuvwx, then we have a b c d e 0 1 2 3 4 5 6 7 8 26 jkim 9 10 11 12 13 opa 14 15 16 17 18 t uvw 19 20 21 22 23 ol n S r 1 Add numbers in ith column in 227 and plus the resulting number to OUT [i] to update the value of OUT[i]. In this example, the updated value will be [20, 25, 3, 8, 3]. (e.g., 0+5+ 9 + 14 + 19 = 20 (mod 27). Since the previous value of UOT [0] = 0, the updated value is 0 + 20 = 20 (mod 27).)

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

Beginning Microsoft SQL Server 2012 Programming

Authors: Paul Atkinson, Robert Vieira

1st Edition

1118102282, 9781118102282

More Books

Students also viewed these Databases questions

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago