Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Fix m = 7. Assume U = {1, 2, ... m - 1}. Consider the family H = {h_1, ... h_m-1

ID: 3854144 • Letter: F

Question

Fix m = 7. Assume U = {1, 2, ... m - 1}. Consider the family H = {h_1, ... h_m-1} of hash functions h_i(k) = (ik) mod m (for i = 1, ... m - 1) (a) Show that according to the definition used by CLRS, this family is not universal. (b) Fix x, y elementof U. Is it true that |{h_i elementof H s.t. h_i(x) = h_i(y)}| lessthanorequalto |H|/m (c) Repeat, the previous question, but now assume U = {1, 2, 3, 4, 8, 9, 10, 11}.

Explanation / Answer

mport javafx.application.Application; import javafx.application.Platform; import javafx.scene.Scene; import javafx.stage.Stage; public class TestApp extends Application { public static void main(String[] args) { launch(args); } @Override public void start(Stage primaryStage) { // launch app: Test test = new Test("Testing"); primaryStage.setScene(new Scene(test.getView(), 300, 250)); primaryStage.show(); // update text in 5 seconds: Thread thread = new Thread(() -> { try { Thread.sleep(5000); } catch (InterruptedException exc) { throw new Error("Unexpected interruption", exc); } Platform.runLater(() -> test.setText("Hello World!")); }); thread.setDaemon(true); thread.start();