Find combination of projection and inverse projection map

Assignment Help Data Structure & Algorithms
Reference no: EM13809920

1. The functions f : {1, 2, 3} → {a, b} and g : {a, b} → {x, y, z} are given by f(1) = b, f(2) = b, f(3) = a, g(a) = y, g(b) = x.

(a) Classify each of f and g as bijective, injective, surjective, or neither.

(b) Find g ? f .

(c) Either find the inverse of g ? f or explain why g ? f is not invertible.

2. I want to develop a database of information about my book collection, which tells me about the authors and genres of the various books I own. At the moment I have books by Isaac Asimov, China Mieville, Peter F Hamilton and Arthur C Clarke, and I denote the set of authors by A = {A, M, H, C}, abbreviating each author by the initial of his surname. I am classifying the books as science fiction, fantasy, horror and non-fiction, so my set of genres is G = {s, f , h, n}, again using initial letters as abbreviations.

At the moment, I have science fiction works by China Mieville and Isaac Asimov, I have fantasy by Peter F Hamilton and China Mieville, horror by Peter F Hamilton and Arthur C Clarke, and non-fiction by Isaac Asimov.

(a) Give the relation R on A × G which represents this information. (You may use appropriate abbreviations.)

(b) Find the combination of projection and inverse projection maps which finds all authors by whom I have horror books.

(c) Find the combination of projection and inverse projection maps which find all writers who have written non-fiction or fantasy books in my collection.

3. (a) Draw the graph with adjacency matrix

2482_img1.png

where the columns and rows label vertices 1 to 5 in order.

(b) Use the adjacency matrix connectivity algorithm, starting by marking row 1 and crossing out column 1, to show whether this graph is connected.

(c) Calculate A 2 and hence find the number of paths of length 2 from vertex 1 to vertex 5.

(d) Find a breadth first spanning tree starting at vertex 3.

4. Use Dijkstra's algorithm to find the shortest path from node a to node f in the following graph.

2251_img2.png

5. Use the heapsort algorithm to put the following list of numbers in decreasing order:

8 2 4 7 1 3 5

You should explain in detail how the original heap is obtained, and then show your sequence of heaps and partial ordered lists.

6. Consider the symbols and frequencies:

o : 12 e : 10 n : 4 t : 6 s : 5 m : 3

(a) Find a Huffman code for this situation, and the average length of an encoded symbol.

(b) Assign the symbols to these codewords in a different order, and comment on the resulting average length.

7. Bob decides to use n = 221 = 13 × 17 and e = 11 as his public key for an RSA cryptosystem.

(a) Show that the decryption exponent is 35.

(b) Find the encrypted form of the message 16.

Reference no: EM13809920

Questions Cloud

Write a paper about workplace discrimination : Write a paper about workplace discrimination.
The constitutions of arizona and the united states : the team leader and responsible for coordinating team field trips. The constitutions of Arizona and the United States
Nadler tushman outputs for palm : Nadler Tushman Outputs for Palm
Diffraction and interference of light : Consider the spacing and peak widths of the light patterns produced by diffraction and interference of light.
Find combination of projection and inverse projection map : Find the combination of projection and inverse projection maps which finds all authors by whom I have horror books
What developmental theory do you find most interesting : What developmental theory do you find most interesting
What technique would managers use to detect big trends : What technique would managers use when seeking to detect big trends and changing market conditions
Practices of global operations management : Apply theories, models, and practices of global operations management to address business problems.
Progress in mastering the course competencies : The objective of this assignment is to measure your progress in mastering the following course competencies:

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  What is the linear data structure

what is the linear data structure ? Give example .Describe how an array is represented.

  What is the output of the first round of the des algorithm

What is the output of the first round of the DES algorithm when the plaintext and the key are both all zeros?

  Skech-perofrm pre order traversal on binary search tree

Let the binary search tree (BST) which is initially empty. Sketch the tree which will result if following numbers are inserted in the same order.

  Users and it organizations arm against phishing attacks

How users and IT organizations must arm themselves against these attacks?

  Find the two closest points from the list

Show how the algorithm would proceed to find the two closest points from the list [(1,2),(1,11),(7,8),(9,9),(12,13),(13,4) ,(20,8),(22,3),(23,12),(25,14),(26,7)(31,10)].

  Write algorithm to create job applicant report

Write the algorithm to create job applicant report. Input consists of a series of records that contain the Social Security number or equivalent, last name, first name, middle initial.

  Write the code to implement the method

The "linked list" has a integer "position". In an array, the position is very easy to implement as it is related to the "index" of the array. In the "linked list", the position is much more difficult.

  Method singleparent returns number of nodes in binary tree

Write a method singleParent, which returns number of nodes in a binary tree that have only one child.

  Ambiguity in proposed algorithm-in representation algorithm

Describe distinction between the ambiguity in proposed algorithm and ambiguity in representation of the algorithm.

  Determine the complexity of the test algorithm

using graphs (or spreadsheets). Remember the supplied data will NOT fit exactly any one curve, so your analysis of the data and your reasoning for which curve is most likely will determine your final grade on this lab.

  Show the postfix expressions

An infix expression is one in which operators are located between their operands - Pop the stack elements and add them to the queue (PostQueue) one by one until the top of the stack has an element of lower precedence

  Huffmancodes

You will turn in one file: HuffmanCodes.java, which can encode and decode files using Huffman codes. The program has the following command-line interface:

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd