Hashing Problem Homework: Generate Hash Function from Table

  • Thread starter Thread starter gruba
  • Start date Start date
  • Tags Tags
    Algorithm
Click For Summary

Discussion Overview

The discussion revolves around a homework problem involving the generation of a hash function based on a table of dependencies for car parts in a manufacturing process. Participants are tasked with finding an order of machines that allows for the uninterrupted production of cars, while also exploring the relationship between this ordering and hash functions.

Discussion Character

  • Homework-related
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • One participant proposes an order of machines (4,2,1,3,8,7,6,5) that allows for uninterrupted production, while also identifying certain lists that cause interruptions.
  • Another participant questions the relevance of hash functions to the problem, seeking clarification on how a hash function could "satisfy" the dependency conditions outlined in the table.
  • A similar concern is raised by another participant, who expresses confusion about the connection between the order of machines and hash functions, suggesting that the sequence should be generated by some function.
  • Further inquiry is made regarding the nature of the function, specifically what is being hashed and what the output represents.

Areas of Agreement / Disagreement

Participants do not appear to agree on the relationship between the problem of ordering machines and the concept of hash functions. Multiple competing views on this relationship remain unresolved.

Contextual Notes

There is uncertainty regarding the definitions and assumptions related to hash functions in the context of this problem, as well as the interpretation of the dependency table. The discussion reflects a lack of consensus on how to approach the problem.

Who May Find This Useful

Readers interested in algorithm design, dependency resolution in production processes, and the application of hash functions in problem-solving may find this discussion relevant.

gruba
Messages
203
Reaction score
1

Homework Statement


In a factory, machines are making cars (1-n) along the production line. One machine is making one part on the existing construction (part 1 is made by machine 1,...). Installation order of some parts is not important, but some parts have to be installed before others. Engineers have put together a dependence list for car parts as a table:
1 2
2 4
3 2,1
4
5 3,8,7,6
6 4,7
7 3,8
8 4,3,1


where the first column represents parts (1-8), and the second column represents preconditions for installment of each part. That is the list of parts (second column) whose installment must be done before the installment of current part (first column).

For each given list (second column), find the order of machines along the production line such that the manufacturing process of a car is done without interruptions, if such order exists. Also, find lists from the given table that give orders with interruptions.

Design an algorithm for this problem.
Show the final order of machines along the production line, if it exists.

Homework Equations


-Hash functions
-Hash tables

The Attempt at a Solution



For each part (1-8, first column) we have to find a hash function without collisions that satisfies the second column in the table (if possible).

This is obviously the reversed process from generating hash table from given hash function.

I have found that the only possible order of machines along with production line, such that there is no interruption in the process is:
4,2,1,3,8,7,6,5

Also, lists 4-7,4-3-1 are causing an interruption (collision) in a process.

Question: How can we generate hash function from hash table (reversed algorithm from standard, where hash function is given - create hash table)?
 
Last edited:
Physics news on Phys.org
I do not understand how the problem of finding an algorithm for this has anything to do with hash functions. Can you explain what you mean by the hash function "satisfying" the second column?
 
haruspex said:
I do not understand how the problem of finding an algorithm for this has anything to do with hash functions. Can you explain what you mean by the hash function "satisfying" the second column?
Maybe I have misunderstood the problem. I think that for each given list (second column), the order of machines along the production line such that the manufacturing process of a car is done without interruptions, if such order exists, is a hash function. Sequence that I gave in the original post should be generated by some function, right?
 
gruba said:
the order of machines ... is a hash function
In what way can the order of a sequence be a function? A function of what? What are we hashing and what is the output?
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
2
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K