This document describes hash maps and hash tables. It provides examples of using a hash function to map keys to indexes in an array, which can store key-value pairs. It discusses concepts like collisions, load factor, and different strategies for handling collisions like open addressing and closed addressing.
HashMap is a part of Java's collection.. It provides the basic implementation of Map interface of Java. It stores the data in (Key, Value) pairs. To access a value key should be known. This ppt dives deep into the internal working of Hashmaps.
Presentation provides introduction and detailed explanation of the Java 8 Lambda and Streams. Lambda covers with Method references, default methods and Streams covers with stream operations,types of streams, collectors. Also streams are elaborated with parallel streams and benchmarking comparison of sequential and parallel streams.
Additional slides are covered with Optional, Splitators, certain projects based on lambda and streams
This document provides an overview of Java's collections framework. It discusses the main interfaces like Collection, Set, List, and Map. It also describes some common implementations like ArrayList, LinkedList, HashSet, TreeMap. The key characteristics of lists, sets, and maps are explained. Lists maintain element order and allow duplicates. Sets do not allow duplicates. Maps contain unique keys that map to values. The document also covers common collection operations and using iterators to traverse elements.
Programs are complete in best of my knowledge with zero compilation error in IDE Bloodshed Dev-C++. These can be easily portable to any versions of Visual Studio or Qt. If you need any guidance please let me know via comments and Always Enjoy Programming.
This document provides an overview of the Java Collections Framework. It discusses core collection interfaces like List, Set, and Map and their common implementations like ArrayList, HashSet, and HashMap. It also covers sorting collections with Comparable and Comparator, searching collections with binary search, and using utility methods in the Collections class. Examples are provided to illustrate usage of various collection classes and methods.
Slides for a lightning talk on Java 8 lambda expressions I gave at the Near Infinity (www.nearinfinity.com) 2013 spring conference.
The associated sample code is on GitHub at https://github.com/sleberknight/java8-lambda-samples
HashMap is a part of Java's collection.. It provides the basic implementation of Map interface of Java. It stores the data in (Key, Value) pairs. To access a value key should be known. This ppt dives deep into the internal working of Hashmaps.
Presentation provides introduction and detailed explanation of the Java 8 Lambda and Streams. Lambda covers with Method references, default methods and Streams covers with stream operations,types of streams, collectors. Also streams are elaborated with parallel streams and benchmarking comparison of sequential and parallel streams.
Additional slides are covered with Optional, Splitators, certain projects based on lambda and streams
This document provides an overview of Java's collections framework. It discusses the main interfaces like Collection, Set, List, and Map. It also describes some common implementations like ArrayList, LinkedList, HashSet, TreeMap. The key characteristics of lists, sets, and maps are explained. Lists maintain element order and allow duplicates. Sets do not allow duplicates. Maps contain unique keys that map to values. The document also covers common collection operations and using iterators to traverse elements.
Programs are complete in best of my knowledge with zero compilation error in IDE Bloodshed Dev-C++. These can be easily portable to any versions of Visual Studio or Qt. If you need any guidance please let me know via comments and Always Enjoy Programming.
This document provides an overview of the Java Collections Framework. It discusses core collection interfaces like List, Set, and Map and their common implementations like ArrayList, HashSet, and HashMap. It also covers sorting collections with Comparable and Comparator, searching collections with binary search, and using utility methods in the Collections class. Examples are provided to illustrate usage of various collection classes and methods.
Slides for a lightning talk on Java 8 lambda expressions I gave at the Near Infinity (www.nearinfinity.com) 2013 spring conference.
The associated sample code is on GitHub at https://github.com/sleberknight/java8-lambda-samples
The Key Difference between a List and a Tuple. The main difference between lists and a tuples is the fact that lists are mutable whereas tuples are immutable. A mutable data type means that a python object of this type can be modified. Let's create a list and assign it to a variable.
The document discusses Java Sets and Maps. It describes that a Set is an unordered collection with no duplicates, while a Map maps keys to values with no duplicate keys. Common Set implementations are HashSet, TreeSet, and LinkedHashSet. Common Map implementations are HashMap and TreeMap. The document provides examples of typical operations on Sets like contains, add, remove, and iterating with iterators or enhanced for loops. It also discusses operations on Maps like put, get, remove, and iterating over the keySet, values, or entrySet.
This document describes an implementation of a stack data structure using a single linked list in C. It includes functions to push elements onto the stack, pop elements off the stack, and display the elements currently in the stack. The main function contains a menu loop that calls these functions based on user input and exits when the user selects option 4.
The Java Stack class implements a last-in, first-out (LIFO) data structure called a stack. It extends the Vector class and inherits its methods. Elements are added to the top of the stack using push() and removed from the top with pop(). The search() method returns the position of an element from the top, and empty() checks if the stack is empty. Common uses of stacks in Java include implementing undo/redo features and evaluating mathematical expressions.
This document provides an overview of HTML5 basics, including:
- The background and need for HTML5 as newer standard to address limitations of HTML4.
- The basic structure of an HTML5 document and new semantic elements.
- Key new features like media elements for embedding video and audio, canvas for drawings, and drag and drop capabilities.
- Additional features such as local storage, offline support through cache manifest files, and Scalable Vector Graphics.
Data structure and algorithm using javaNarayan Sau
This presentation created for people who like to go back to basics of data structure and its implementation. This presentation mostly helps B.Tech , Bsc Computer science students as well as all programmer who wants to develop software in core areas.
These are slides from our Big Data Warehouse Meetup in April. We talked about NoSQL databases: What they are, how they’re used and where they fit in existing enterprise data ecosystems.
Mike O’Brian from 10gen, introduced the syntax and usage patterns for a new aggregation system in MongoDB and give some demonstrations of aggregation using the new system. The new MongoDB aggregation framework makes it simple to do tasks such as counting, averaging, and finding minima or maxima while grouping by keys in a collection, complementing MongoDB’s built-in map/reduce capabilities.
For more information, visit our website at http://casertaconcepts.com/ or email us at info@casertaconcepts.com.
This document discusses various PHP functions and concepts related to working with databases in PHP, including:
- PHP functions for arrays, calendars, file systems, MySQL, and math
- Using phpMyAdmin to manage MySQL databases
- The GET and POST methods for passing form data
- SQL commands for creating, altering, and manipulating database tables
- Connecting to a MySQL database from PHP using mysql_connect()
It provides code examples for using many of these PHP functions and SQL commands to interact with databases. The document is an overview of key topics for learning PHP database programming.
Binary search provides an efficient O(log n) solution for searching a sorted list. It works by repeatedly dividing the search space in half and focusing on only one subdivision, based on comparing the search key to the middle element. This recursively narrows down possible locations until the key is found or the entire list has been searched. Binary search mimics traversing a binary search tree built from the sorted list, with divide-and-conquer reducing the search space at each step.
The document discusses various built-in functions in MySQL for manipulating date, time, string, and numeric data. It describes functions for formatting dates, extracting date elements, adding or subtracting times, concatenating and modifying strings. Common functions covered include DATE_FORMAT(), NOW(), CURDATE(), CONCAT(), REPLACE(), LEFT(), RIGHT(), and MID().
The document discusses various data structures and their classification. It begins by stating the objectives of understanding how data structures can be classified, basic data types and arrays, and problem-oriented data structures used to solve specific problems. It then defines key terms like data, information, and data structures. It describes primitive and non-primitive, linear and non-linear data structures. It also discusses basic and problem-oriented data structures like lists, stacks, queues, and trees. It provides examples and applications of different data structures.
Quicksort is a divide and conquer sorting algorithm that works by partitioning an array around a pivot value. It then recursively sorts the sub-arrays on each side. The key steps are: 1) Choose a pivot element to split the array into left and right halves, with all elements on the left being less than the pivot and all on the right being greater; 2) Recursively quicksort the left and right halves; 3) Combine the now-sorted left and right halves into a fully sorted array. The example demonstrates quicksorting an array of 6 elements by repeatedly partitioning around a pivot until the entire array is sorted.
The document discusses the use of the keywords super and this in Java. Super allows subclasses to access methods and fields of the parent class that have been overridden or hidden. It has two forms - to call the parent constructor or to access a hidden parent member. This refers to the current object and is used to avoid name conflicts between instance variables and local variables.
This document discusses Java collections framework and various collection classes like ArrayList, LinkedList, HashSet, HashMap etc. It provides definitions and examples of commonly used collection interfaces like List, Set and Map. It explains key features of different collection classes like order, duplicates allowed, synchronization etc. Iterators and generic types are also covered with examples to iterate and create typed collection classes.
This document provides an introduction to hashing and hash tables. It defines hashing as a data structure that uses a hash function to map values to keys for fast retrieval. It gives an example of mapping list values to array indices using modulo. The document discusses hash tables and their operations of search, insert and delete in O(1) time. It describes collisions that occur during hash function mapping and resolution techniques like separate chaining and linear probing.
The document provides an overview of the Java programming language and related technologies including servlets, JSP, Struts, Hibernate, and Tiles. It discusses what Java is, its history and technology, the different Java editions, J2EE and its components, how servlets and JSP work, database handling with JDBC, the MVC pattern implemented by Struts, and object relational mapping with Hibernate. Tiles is described as a framework for assembling web pages from individual visual components.
Packages in Java are used to organize classes and provide namespace management to avoid naming conflicts. A package groups related types like classes, interfaces, enums and annotations. Programmers can define their own packages to organize related classes. Packages create a new namespace to avoid conflicts and make classes easier to locate and access. The package name is specified in a source file using the package keyword and files for a package must be stored in a subdirectory matching the package name. Classes in other packages can be accessed using their fully qualified names or by importing the package.
This document discusses Remote Method Invocation (RMI) in Java. It describes the general RMI architecture involving clients, servers, stubs, and skeletons. It outlines the steps to develop an RMI system, including defining the remote interface, developing the remote object, generating stubs and skeletons, starting the RMI registry, and running the client. Key aspects covered are the stub and skeleton's roles in marshaling and unmarshaling calls and results, as well as using a security policy file to control permissions.
This document provides an overview of JSP/Servlet architecture. It describes how a web request is handled from the browser to the web server and JSP/Servlet container. It then discusses key components like servlets, JSPs, the request and response objects. It provides examples of basic servlet and JSP code to output text and access request parameters. It also covers servlet configuration, mappings, and the use of forwards and redirects.
The document discusses Spring IOC and DAO. It provides an overview of Spring framework, Inversion of Control (IOC) and Dependency Injection in Spring. It also describes how Spring supports data access with JDBC Template and DAO implementations. The JDBC Template simplifies JDBC usage and avoids common errors by providing callback interfaces for writing and reading database operations. Spring DAO classes can extend support classes to get a JDBC or Hibernate template based on the persistence mechanism.
Cassandra Community Webinar | Cassandra 2.0 - Better, Faster, StrongerDataStax
Patrick McFadin presented on new features in Cassandra 2.0 including lightweight transactions, triggers, CQL improvements, and performance enhancements. Some key points are that lightweight transactions allow conditional updates in a single atomic operation, triggers allow custom Java code to modify mutations before writing, and various optimizations improve query performance, server performance, and operation throughput. Removed features include SuperColumns and on-heap row caching.
The Key Difference between a List and a Tuple. The main difference between lists and a tuples is the fact that lists are mutable whereas tuples are immutable. A mutable data type means that a python object of this type can be modified. Let's create a list and assign it to a variable.
The document discusses Java Sets and Maps. It describes that a Set is an unordered collection with no duplicates, while a Map maps keys to values with no duplicate keys. Common Set implementations are HashSet, TreeSet, and LinkedHashSet. Common Map implementations are HashMap and TreeMap. The document provides examples of typical operations on Sets like contains, add, remove, and iterating with iterators or enhanced for loops. It also discusses operations on Maps like put, get, remove, and iterating over the keySet, values, or entrySet.
This document describes an implementation of a stack data structure using a single linked list in C. It includes functions to push elements onto the stack, pop elements off the stack, and display the elements currently in the stack. The main function contains a menu loop that calls these functions based on user input and exits when the user selects option 4.
The Java Stack class implements a last-in, first-out (LIFO) data structure called a stack. It extends the Vector class and inherits its methods. Elements are added to the top of the stack using push() and removed from the top with pop(). The search() method returns the position of an element from the top, and empty() checks if the stack is empty. Common uses of stacks in Java include implementing undo/redo features and evaluating mathematical expressions.
This document provides an overview of HTML5 basics, including:
- The background and need for HTML5 as newer standard to address limitations of HTML4.
- The basic structure of an HTML5 document and new semantic elements.
- Key new features like media elements for embedding video and audio, canvas for drawings, and drag and drop capabilities.
- Additional features such as local storage, offline support through cache manifest files, and Scalable Vector Graphics.
Data structure and algorithm using javaNarayan Sau
This presentation created for people who like to go back to basics of data structure and its implementation. This presentation mostly helps B.Tech , Bsc Computer science students as well as all programmer who wants to develop software in core areas.
These are slides from our Big Data Warehouse Meetup in April. We talked about NoSQL databases: What they are, how they’re used and where they fit in existing enterprise data ecosystems.
Mike O’Brian from 10gen, introduced the syntax and usage patterns for a new aggregation system in MongoDB and give some demonstrations of aggregation using the new system. The new MongoDB aggregation framework makes it simple to do tasks such as counting, averaging, and finding minima or maxima while grouping by keys in a collection, complementing MongoDB’s built-in map/reduce capabilities.
For more information, visit our website at http://casertaconcepts.com/ or email us at info@casertaconcepts.com.
This document discusses various PHP functions and concepts related to working with databases in PHP, including:
- PHP functions for arrays, calendars, file systems, MySQL, and math
- Using phpMyAdmin to manage MySQL databases
- The GET and POST methods for passing form data
- SQL commands for creating, altering, and manipulating database tables
- Connecting to a MySQL database from PHP using mysql_connect()
It provides code examples for using many of these PHP functions and SQL commands to interact with databases. The document is an overview of key topics for learning PHP database programming.
Binary search provides an efficient O(log n) solution for searching a sorted list. It works by repeatedly dividing the search space in half and focusing on only one subdivision, based on comparing the search key to the middle element. This recursively narrows down possible locations until the key is found or the entire list has been searched. Binary search mimics traversing a binary search tree built from the sorted list, with divide-and-conquer reducing the search space at each step.
The document discusses various built-in functions in MySQL for manipulating date, time, string, and numeric data. It describes functions for formatting dates, extracting date elements, adding or subtracting times, concatenating and modifying strings. Common functions covered include DATE_FORMAT(), NOW(), CURDATE(), CONCAT(), REPLACE(), LEFT(), RIGHT(), and MID().
The document discusses various data structures and their classification. It begins by stating the objectives of understanding how data structures can be classified, basic data types and arrays, and problem-oriented data structures used to solve specific problems. It then defines key terms like data, information, and data structures. It describes primitive and non-primitive, linear and non-linear data structures. It also discusses basic and problem-oriented data structures like lists, stacks, queues, and trees. It provides examples and applications of different data structures.
Quicksort is a divide and conquer sorting algorithm that works by partitioning an array around a pivot value. It then recursively sorts the sub-arrays on each side. The key steps are: 1) Choose a pivot element to split the array into left and right halves, with all elements on the left being less than the pivot and all on the right being greater; 2) Recursively quicksort the left and right halves; 3) Combine the now-sorted left and right halves into a fully sorted array. The example demonstrates quicksorting an array of 6 elements by repeatedly partitioning around a pivot until the entire array is sorted.
The document discusses the use of the keywords super and this in Java. Super allows subclasses to access methods and fields of the parent class that have been overridden or hidden. It has two forms - to call the parent constructor or to access a hidden parent member. This refers to the current object and is used to avoid name conflicts between instance variables and local variables.
This document discusses Java collections framework and various collection classes like ArrayList, LinkedList, HashSet, HashMap etc. It provides definitions and examples of commonly used collection interfaces like List, Set and Map. It explains key features of different collection classes like order, duplicates allowed, synchronization etc. Iterators and generic types are also covered with examples to iterate and create typed collection classes.
This document provides an introduction to hashing and hash tables. It defines hashing as a data structure that uses a hash function to map values to keys for fast retrieval. It gives an example of mapping list values to array indices using modulo. The document discusses hash tables and their operations of search, insert and delete in O(1) time. It describes collisions that occur during hash function mapping and resolution techniques like separate chaining and linear probing.
The document provides an overview of the Java programming language and related technologies including servlets, JSP, Struts, Hibernate, and Tiles. It discusses what Java is, its history and technology, the different Java editions, J2EE and its components, how servlets and JSP work, database handling with JDBC, the MVC pattern implemented by Struts, and object relational mapping with Hibernate. Tiles is described as a framework for assembling web pages from individual visual components.
Packages in Java are used to organize classes and provide namespace management to avoid naming conflicts. A package groups related types like classes, interfaces, enums and annotations. Programmers can define their own packages to organize related classes. Packages create a new namespace to avoid conflicts and make classes easier to locate and access. The package name is specified in a source file using the package keyword and files for a package must be stored in a subdirectory matching the package name. Classes in other packages can be accessed using their fully qualified names or by importing the package.
This document discusses Remote Method Invocation (RMI) in Java. It describes the general RMI architecture involving clients, servers, stubs, and skeletons. It outlines the steps to develop an RMI system, including defining the remote interface, developing the remote object, generating stubs and skeletons, starting the RMI registry, and running the client. Key aspects covered are the stub and skeleton's roles in marshaling and unmarshaling calls and results, as well as using a security policy file to control permissions.
This document provides an overview of JSP/Servlet architecture. It describes how a web request is handled from the browser to the web server and JSP/Servlet container. It then discusses key components like servlets, JSPs, the request and response objects. It provides examples of basic servlet and JSP code to output text and access request parameters. It also covers servlet configuration, mappings, and the use of forwards and redirects.
The document discusses Spring IOC and DAO. It provides an overview of Spring framework, Inversion of Control (IOC) and Dependency Injection in Spring. It also describes how Spring supports data access with JDBC Template and DAO implementations. The JDBC Template simplifies JDBC usage and avoids common errors by providing callback interfaces for writing and reading database operations. Spring DAO classes can extend support classes to get a JDBC or Hibernate template based on the persistence mechanism.
Cassandra Community Webinar | Cassandra 2.0 - Better, Faster, StrongerDataStax
Patrick McFadin presented on new features in Cassandra 2.0 including lightweight transactions, triggers, CQL improvements, and performance enhancements. Some key points are that lightweight transactions allow conditional updates in a single atomic operation, triggers allow custom Java code to modify mutations before writing, and various optimizations improve query performance, server performance, and operation throughput. Removed features include SuperColumns and on-heap row caching.
How Twitter Works (Arsen Kostenko Technology Stream) IT Arena
Lviv IT Arena is a conference specially designed for programmers, designers, developers, top managers, inverstors, entrepreneurs and startuppers. Annually it takes place at the beginning of October in Lviv at Arena Lviv stadium. In 2016 the conference gathered more than 1800 participants and over 100 speakers from companies like Microsoft, Philips, Twitter, UBER and IBM. More details about the conference at itarena.lviv.ua.
This document discusses hashing techniques for implementing symbol tables. It begins by reviewing the motivation for symbol tables in compilers and describing the basic operations of search, insertion and deletion that a hash table aims to support efficiently. It then discusses direct addressing and its limitations when key ranges are large. The concept of a hash function is introduced to map keys to a smaller range to enable direct addressing. Collision resolution techniques of chaining and open addressing are covered. Analysis of expected costs for different operations on chaining hash tables is provided. Various hash functions are described including division and multiplication methods, and the importance of choosing a hash function to distribute keys uniformly is discussed. The document concludes by mentioning universal hashing as a technique to randomize the hash function
Dependency Injection and Inversion Of ControlSimone Busoli
This is a short presentation I gave back in 2008 at the UgiAlt.Net conference in Milan about inversion of control and dependency injection principles. Examples use Castle project's Windsor container.
Metrics at Scale @ UBER (Mantas Klasavicius Technology Stream)IT Arena
Lviv IT Arena is a conference specially designed for programmers, designers, developers, top managers, inverstors, entrepreneurs and startuppers. Annually it takes place at the beginning of October in Lviv at Arena Lviv stadium. In 2016 the conference gathered more than 1800 participants and over 100 speakers from companies like Microsoft, Philips, Twitter, UBER and IBM. More details about the conference at itarena.lviv.ua.
“Program to an interface, not an implementation” they[1] say …
But when IMyInterface foo = new IMyInterface() is not valid code … how are you supposed to achieve that ? The answer is Dependency Injection.
In this talk, we’ll talk about Dependency injection, what it is and what it is not. We’ll see how it is a valuable set of practices and patterns that help design maintainable software built on top of the SOLID object-oriented principles.
We’ll see how, when used properly, it delivers many benefits such as extensibility and testability … We’ll also cover some anti-patterns, ways of using Dependency Injection that can lead to code that is painful to understand and maintain
This talk is not about DI/IOC containers per se, but focuses on the core concepts of Dependency Injection. Those concepts are essential to understand how to use those “magic-looking” tools (if they are needed at all …)
This talk is not only for .NET developers. It will contain code examples written in C#, but should be understandable by developers with knowledge in other statically-typed object-oriented languages such as Java, Vb.NET, C++ …
This presentation goes through what Inversion of Control is, which IOC patterns that exists, which of the patterns you should use and when you should use them.
The document provides guidance on preparing for an interview at Amazon for a software engineering role. It recommends:
1. Spending 400 hours over several months to thoroughly understand algorithms, data structures, and coding problems while implementing solutions in a chosen language.
2. Practicing how to discuss problem solving approaches and connect solutions to computing resources.
3. Preparing answers to common interview questions about work experience, skills, and computer science fundamentals.
The key aspects are developing strong technical skills and practice explaining your thought process during problem solving to demonstrate your qualifications for the role.
The document outlines the steps involved in system analysis and design for information systems development. It discusses fact finding to understand the current system, conducting a feasibility study to determine if the proposed new system is technically and economically viable, and the analysis phase where a more detailed review is performed to understand weaknesses and design system flow charts and data flow diagrams. The analysis phase also includes setting detailed objectives, reviewing constraints, updating the cost/benefit analysis, and planning for further system development.
Max De Marzi gave an introduction to graph databases using Neo4j as an example. He discussed trends in big, connected data and how NoSQL databases like key-value stores, column families, and document databases address these trends. However, graph databases are optimized for interconnected data by modeling it as nodes and relationships. Neo4j is a graph database that uses a property graph data model and allows querying and traversal through its Cypher query language and Gremlin scripting language. It is well-suited for domains involving highly connected data like social networks.
The document summarizes the systems development life cycle (SDLC) which includes four phases - planning, analysis, design, and implementation. Each phase consists of steps that produce deliverables and moves the system design forward through refinement. Methodologies like waterfall, RAD, agile help structure the SDLC process. Key factors in selecting a methodology include requirements clarity, technology familiarity, system complexity, reliability needs, and time schedules.
This document discusses graph databases and provides examples of how the Neo4j graph database can be used. It shows how Neo4j supports social, spatial, financial and other types of connected data. It also summarizes Neo4j's REST API, support for object-oriented programming, routing algorithms, multiple indexes, recommendation systems, and other use cases. The document advocates for graph databases for any problem involving multiple relationships and connections between entities.
This document provides an overview of graph databases and their use cases. It begins with definitions of graphs and graph databases. It then gives examples of how graph databases can be used for social networking, network management, and other domains where data is interconnected. It provides Cypher examples for creating and querying graph patterns in a social networking and IT network management scenario. Finally, it discusses the graph database ecosystem and how graphs can be deployed for both online transaction processing and batch processing use cases.
discuss about System system analysis, system design, system analyst's role, Development of System through analysis, SDLC, Case Tools of SAD, Implementation, etc.
Neo4j is a powerful and expressive tool for storing, querying and manipulating data. However modeling data as graphs is quite different from modeling data under a relational database. In this talk, Michael Hunger will cover modeling business domains using graphs and show how they can be persisted and queried in Neo4j. We'll contrast this approach with the relational model, and discuss the impact on complexity, flexibility and performance.
1. LISP (LISt Processing language) is a programming language developed in 1958 with a focus on symbolic processing and manipulation of linked lists and list structures. Common Lisp and Scheme are currently widely used LISP dialects.
2. LISP uses prefix notation and parentheses to define lists and programs. It has basic data types of symbols and lists, with lists representing both data structures and function calls.
3. LISP supports defining recursive functions, conditional statements, local variables, arrays, structures and iterations using commands like loop, dolist, and dotimes. It also allows manipulating and evaluating code as data.
The document describes the steps of SLR parsing:
1. Create an augmented grammar by adding a new start symbol S' and the production S' -> S.
2. Generate kernel items by introducing dots in productions.
3. Find the closure of kernel items.
4. Compute the goto table from the closure sets.
5. Construct the parsing table from the goto table and closure sets.
6. Parse input strings using the parsing table and stack.
The Advanced Encryption Standard, also known by its original name Rijndael, is a specification for the encryption of electronic data established by the U.S.
A successful maximum likelihood parameter estimation in skewed distributions ...Hideo Hirose
A successful maximum likelihood parameter estimation scheme using
the continuation method (homotopy method) is introduced. This
algorithm is particularly useful for the three-parameter skewed
distributions including thresholds. Such three-parameter
distributions are, for example, Weibull, log-normal, gamma and
inverse Gaussian distributions. As the proposed algorithm can almost
always obtain the local maximum likelihood estimates automatically,
it is of considerable practical value. The Monte Carlo simulation
study shows the effectiveness of the proposed method.
The document outlines various data structures and algorithms for implementing dictionaries and hash tables, including:
- Separate chaining, which handles collisions by storing elements that hash to the same value in a linked list. Find, insert, and delete take average time of O(1).
- Open addressing techniques like linear probing and quadratic probing, which handle collisions by probing to alternate locations until an empty slot is found. These have faster search but slower inserts and deletes.
- Double hashing, which uses a second hash function to determine probe distances when collisions occur, reducing clustering compared to linear probing.
This document discusses hashing techniques for indexing and retrieving elements in a data structure. It begins by defining hashing and its components like hash functions, collisions, and collision handling. It then describes two common collision handling techniques - separate chaining and open addressing. Separate chaining uses linked lists to handle collisions while open addressing resolves collisions by probing to find alternate empty slots using techniques like linear probing and quadratic probing. The document provides examples and explanations of how these hashing techniques work.
Hashing is a technique for mapping data to array indices to allow for fast insertion and search operations in O(1) time on average. It works by applying a hash function to a key to obtain an array index, which may cause collisions that require resolution techniques like separate chaining or open addressing. Open addressing resolves collisions by probing alternative indices using functions like linear probing, quadratic probing, or double hashing to find the next available empty slot.
The document describes the process of depth-first search (DFS) on a graph using an adjacency list representation. It shows the recursive DFS algorithm by stepping through an example graph with 8 nodes. At each step, it marks the currently visited node as visited, marks the predecessors, and makes recursive calls to visit neighboring unvisited nodes. This traces out the DFS tree, showing how the structure captures the recursive calls. It concludes that DFS finds valid paths in the graph and runs in O(V+E) time like breadth-first search when using an adjacency list.
[PyCon KR 2019] Pickle & Custom Binary SerializerYoung Seok Kim
This document summarizes a talk on Pickle and custom binary serialization in Python. The talk introduces Pickle as Python's standard library for serializing and de-serializing Python objects. It covers Pickle's APIs and protocols, compares Pickle to other serialization methods like JSON and Protobuf, and demonstrates how to build a simple custom serializer. The objective is to understand how Pickle works internally and when it is best to use Pickle versus other options.
DES is a symmetric-key block cipher published by NIST. It uses a 56-bit key to encrypt 64-bit blocks. DES has an initial and final permutation, and uses 16 rounds of encryption with subkeys generated from the main key. Each round includes expansion, XOR with a subkey, S-boxes for substitution, and permutation. Analysis has shown DES exhibits the avalanche effect but has weaknesses due to its key size and structure.
The document discusses different ways to implement tables or dictionaries using data structures like arrays, linked lists, and skip lists. It explains that tables consist of rows and columns of data with fields/keys that uniquely identify each entry. Arrays allow fast searching if sorted but slow insertion/deletion. Linked lists allow fast insertion/deletion but slow searching. Skip lists combine fast search of sorted data structures with fast insertion/deletion of unsorted structures.
1) The document discusses using CORBA for large, distributed control systems like air traffic control centers. It describes challenges like integration and managing changes.
2) CORBA is proposed as a solution because it provides an object software bus and allows for distributed polymorphism, enabling seamless integration and flexible handling of changes.
3) Examples are given of how CORBA supports integration of new printers and color printers in a polymorphic, object-oriented way that simplifies change management.
This document provides a tutorial for using CARDAMOM, a product for building distributed applications. It contains 192 pages describing CARDAMOM concepts like software components and the CORBA Component Model. It includes examples of how to set up a development directory, compile and run sample programs, and defines key terms. The purpose is to help newcomers learn how to effectively use CARDAMOM.
This document provides book recommendations and references related to information system architecture. It lists seminal books on software engineering by Fred Brooks, Grady Booch, and Christopher Alexander. It also references books on design patterns by the "Gang of Four" and multiple editions of Pattern-Oriented Software Architecture (POSA). Several influential authors are mentioned including Douglas Schmidt, Martin Fowler, Robert Martin, Craig Larman, and Alistair Cockburn. The document provides links to works by Andrew Tanenbaum, C.J. Date, and others relevant to information system architecture.
PLUG is a presentation layer universal generator that provides automatic code generation from specifications. It uses object-oriented design and handles heterogeneous programming languages and hardware. PLUG can generate stubs for API usage and message coders for object message passing between distributed applications.
Template driven code generation tool, fore real time and safety critical systems.
API message formating and serialisation.
Template driven source code generator for any language : Ada, C, C#, Java, ...
Template driven code generation tool, fore real time and safety critical systems.
API message formating and serialisation.
Template driven source code generator for any language : Ada, C, C#, Java, ...
Template driven code generation tool, fore real time and safety critical systems.
API message formating and serialisation.
Template driven source code generator for any language : Ada, C, C#, Java, ...
UBSS is middleware software that provides high-performance real-time services to applications, hiding underlying hardware and operating system complexity. It was designed for air traffic control and command systems. UBSS improves correctness, simplicity, portability, flexibility and reuse for distributed applications. It provides encapsulation of UNIX APIs and adds functionality for time management, communication, supervision, and operator support. UBSS has a modular design and consists of 10 configuration items that can be customized for different applications and systems.
The document describes an air traffic control system. It includes descriptions of various components like flight plan processing, supervisory control, simulator, radar data processing, and intranet connections. Diagrams show how these components interact and interface. The document also discusses concepts like system complexity, code size, abstraction levels, and how changes can impact complexity over time. Design patterns for modeling points in multiple dimensions are presented, with interfaces to support additional types. State diagrams demonstrate modeling state machines with states, transitions, and tasks.
The document discusses the history and architecture of air traffic control systems. It describes:
1) Early ATC systems used centralized servers and proprietary hardware/software from Thomson CSF.
2) Later systems like Eurocat used distributed UNIX servers, TCP/IP, and open standards.
3) These systems comprised workstations, front processors for radar/flight data, and LAN/WAN networks to share data between ATC centers and other facilities.
The document discusses middleware concepts, principles, paradigms and frameworks. Middleware aims to connect distributed systems in a transparent way by abstracting the underlying network and providing common services. It discusses key middleware concepts like distributed transparency, high-level abstraction models, and service-oriented architectures. Middleware paradigms include data-oriented messaging, client-server architectures, and distributed component-based systems. The document also covers THALES' experience with middleware and frameworks.
EUROCAT is an air traffic management system developed by Thomson-CSF Airsys and Siemens that provides capabilities for en route, approach, terminal, and tower air traffic control. It uses a distributed, client-server architecture and has redundant systems to ensure high availability. EUROCAT has been implemented in over 25 systems worldwide since 1992 and can support advanced functions like automatic dependent surveillance.
The document is the executive summary of the second edition of the ITEA Technology Roadmap for Software-Intensive Systems from May 2004. It outlines the process used to update the roadmap, which involved developing scenarios of potential application evolutions, clustering results to outline software system evolutions, and structuring the analysis around application domains and technology clusters. It summarizes the findings in terms of the four technology clusters: content, infrastructure and basic services, human-system interaction, and engineering. For each cluster it provides a brief description and table outlining the major challenges.
This document provides an agenda and descriptions for an Architecture-Driven Modernization workshop taking place from March 22-24, 2004 in Chicago. The workshop includes several tutorials and sessions on topics related to modernizing existing software systems through architecture-driven approaches and leveraging existing assets. Tutorials will cover application modernization strategies, managing existing software through architectural models, and harvesting reusable components from legacy code. Sessions will present methodologies for model-driven legacy migration, domain-driven modernization, addressing scale in analysis tools, mining software architecture from databases, and extending the life of software through componentization.
Measures in SQL (SIGMOD 2024, Santiago, Chile)Julian Hyde
SQL has attained widespread adoption, but Business Intelligence tools still use their own higher level languages based upon a multidimensional paradigm. Composable calculations are what is missing from SQL, and we propose a new kind of column, called a measure, that attaches a calculation to a table. Like regular tables, tables with measures are composable and closed when used in queries.
SQL-with-measures has the power, conciseness and reusability of multidimensional languages but retains SQL semantics. Measure invocations can be expanded in place to simple, clear SQL.
To define the evaluation semantics for measures, we introduce context-sensitive expressions (a way to evaluate multidimensional expressions that is consistent with existing SQL semantics), a concept called evaluation context, and several operations for setting and modifying the evaluation context.
A talk at SIGMOD, June 9–15, 2024, Santiago, Chile
Authors: Julian Hyde (Google) and John Fremlin (Google)
https://doi.org/10.1145/3626246.3653374
Flutter is a popular open source, cross-platform framework developed by Google. In this webinar we'll explore Flutter and its architecture, delve into the Flutter Embedder and Flutter’s Dart language, discover how to leverage Flutter for embedded device development, learn about Automotive Grade Linux (AGL) and its consortium and understand the rationale behind AGL's choice of Flutter for next-gen IVI systems. Don’t miss this opportunity to discover whether Flutter is right for your project.
E-commerce Development Services- Hornet DynamicsHornet Dynamics
For any business hoping to succeed in the digital age, having a strong online presence is crucial. We offer Ecommerce Development Services that are customized according to your business requirements and client preferences, enabling you to create a dynamic, safe, and user-friendly online store.
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsPeter Muessig
The UI5 tooling is the development and build tooling of UI5. It is built in a modular and extensible way so that it can be easily extended by your needs. This session will showcase various tooling extensions which can boost your development experience by far so that you can really work offline, transpile your code in your project to use even newer versions of EcmaScript (than 2022 which is supported right now by the UI5 tooling), consume any npm package of your choice in your project, using different kind of proxies, and even stitching UI5 projects during development together to mimic your target environment.
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeAftab Hussain
Understanding variable roles in code has been found to be helpful by students
in learning programming -- could variable roles help deep neural models in
performing coding tasks? We do an exploratory study.
- These are slides of the talk given at InteNSE'23: The 1st International Workshop on Interpretability and Robustness in Neural Software Engineering, co-located with the 45th International Conference on Software Engineering, ICSE 2023, Melbourne Australia
Using Query Store in Azure PostgreSQL to Understand Query PerformanceGrant Fritchey
Microsoft has added an excellent new extension in PostgreSQL on their Azure Platform. This session, presented at Posette 2024, covers what Query Store is and the types of information you can get out of it.
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Crescat
Crescat is industry-trusted event management software, built by event professionals for event professionals. Founded in 2017, we have three key products tailored for the live event industry.
Crescat Event for concert promoters and event agencies. Crescat Venue for music venues, conference centers, wedding venues, concert halls and more. And Crescat Festival for festivals, conferences and complex events.
With a wide range of popular features such as event scheduling, shift management, volunteer and crew coordination, artist booking and much more, Crescat is designed for customisation and ease-of-use.
Over 125,000 events have been planned in Crescat and with hundreds of customers of all shapes and sizes, from boutique event agencies through to international concert promoters, Crescat is rigged for success. What's more, we highly value feedback from our users and we are constantly improving our software with updates, new features and improvements.
If you plan events, run a venue or produce festivals and you're looking for ways to make your life easier, then we have a solution for you. Try our software for free or schedule a no-obligation demo with one of our product specialists today at crescat.io
Microservice Teams - How the cloud changes the way we workSven Peters
A lot of technical challenges and complexity come with building a cloud-native and distributed architecture. The way we develop backend software has fundamentally changed in the last ten years. Managing a microservices architecture demands a lot of us to ensure observability and operational resiliency. But did you also change the way you run your development teams?
Sven will talk about Atlassian’s journey from a monolith to a multi-tenanted architecture and how it affected the way the engineering teams work. You will learn how we shifted to service ownership, moved to more autonomous teams (and its challenges), and established platform and enablement teams.
How Can Hiring A Mobile App Development Company Help Your Business Grow?ToXSL Technologies
ToXSL Technologies is an award-winning Mobile App Development Company in Dubai that helps businesses reshape their digital possibilities with custom app services. As a top app development company in Dubai, we offer highly engaging iOS & Android app solutions. https://rb.gy/necdnt
Most important New features of Oracle 23c for DBAs and Developers. You can get more idea from my youtube channel video from https://youtu.be/XvL5WtaC20A
SMS API Integration in Saudi Arabia| Best SMS API ServiceYara Milbes
Discover the benefits and implementation of SMS API integration in the UAE and Middle East. This comprehensive guide covers the importance of SMS messaging APIs, the advantages of bulk SMS APIs, and real-world case studies. Learn how CEQUENS, a leader in communication solutions, can help your business enhance customer engagement and streamline operations with innovative CPaaS, reliable SMS APIs, and omnichannel solutions, including WhatsApp Business. Perfect for businesses seeking to optimize their communication strategies in the digital age.
UI5con 2024 - Bring Your Own Design SystemPeter Muessig
How do you combine the OpenUI5/SAPUI5 programming model with a design system that makes its controls available as Web Components? Since OpenUI5/SAPUI5 1.120, the framework supports the integration of any Web Components. This makes it possible, for example, to natively embed own Web Components of your design system which are created with Stencil. The integration embeds the Web Components in a way that they can be used naturally in XMLViews, like with standard UI5 controls, and can be bound with data binding. Learn how you can also make use of the Web Components base class in OpenUI5/SAPUI5 to also integrate your Web Components and get inspired by the solution to generate a custom UI5 library providing the Web Components control wrappers for the native ones.
Hand Rolled Applicative User ValidationCode KataPhilip Schwarz
Could you use a simple piece of Scala validation code (granted, a very simplistic one too!) that you can rewrite, now and again, to refresh your basic understanding of Applicative operators <*>, <*, *>?
The goal is not to write perfect code showcasing validation, but rather, to provide a small, rough-and ready exercise to reinforce your muscle-memory.
Despite its grandiose-sounding title, this deck consists of just three slides showing the Scala 3 code to be rewritten whenever the details of the operators begin to fade away.
The code is my rough and ready translation of a Haskell user-validation program found in a book called Finding Success (and Failure) in Haskell - Fall in love with applicative functors.
Graspan: A Big Data System for Big Code AnalysisAftab Hussain
We built a disk-based parallel graph system, Graspan, that uses a novel edge-pair centric computation model to compute dynamic transitive closures on very large program graphs.
We implement context-sensitive pointer/alias and dataflow analyses on Graspan. An evaluation of these analyses on large codebases such as Linux shows that their Graspan implementations scale to millions of lines of code and are much simpler than their original implementations.
These analyses were used to augment the existing checkers; these augmented checkers found 132 new NULL pointer bugs and 1308 unnecessary NULL tests in Linux 4.4.0-rc5, PostgreSQL 8.3.9, and Apache httpd 2.2.18.
- Accepted in ASPLOS ‘17, Xi’an, China.
- Featured in the tutorial, Systemized Program Analyses: A Big Data Perspective on Static Analysis Scalability, ASPLOS ‘17.
- Invited for presentation at SoCal PLS ‘16.
- Invited for poster presentation at PLDI SRC ‘16.
Zoom is a comprehensive platform designed to connect individuals and teams efficiently. With its user-friendly interface and powerful features, Zoom has become a go-to solution for virtual communication and collaboration. It offers a range of tools, including virtual meetings, team chat, VoIP phone systems, online whiteboards, and AI companions, to streamline workflows and enhance productivity.
8 Best Automated Android App Testing Tool and Framework in 2024.pdfkalichargn70th171
Regarding mobile operating systems, two major players dominate our thoughts: Android and iPhone. With Android leading the market, software development companies are focused on delivering apps compatible with this OS. Ensuring an app's functionality across various Android devices, OS versions, and hardware specifications is critical, making Android app testing essential.
Artificia Intellicence and XPath Extension FunctionsOctavian Nadolu
The purpose of this presentation is to provide an overview of how you can use AI from XSLT, XQuery, Schematron, or XML Refactoring operations, the potential benefits of using AI, and some of the challenges we face.
3. Key VALUE
pierre 01.42.78.96.12
paul 03.67.90.67.00
françois 01.45.87.90.45
mohamed 04.88.8945.29
khaled 06.98.56.22.48
laila 01.23.45.67.89
alex 34.56.15.27.78.
claire 34.56.73.45.67
philippe 02.34.26.48.26.
Hash()
françois 01.45.87.90.45
Phone Numbers list example
4. Key VALUE
pierre 01.42.78.96.12
paul 03.67.90.67.00
françois 01.45.87.90.45
mohamed 04.88.8945.29
khaled 06.98.56.22.48
laila 01.23.45.67.89
alex 34.56.15.27.78.
claire 34.56.73.45.67
philippe 02.34.26.48.26.
Hash()
françois 01.45.87.90.45
Phone Numbers list example
Key Value
5. Employees File SSN : Social Security Number
125675798988090
000000000000000
999999999999999
Social Security Number = address
6. Employees File SSN : Social Security Number
125675798988090
000000000000000
999999999999999
Social Security Number = address
steve
mike
john
bob
max
edward
John SSN : 125675798988090
7. Employees File SSN : Social Security Number
125675798988090
000000000000000
999999999999999
Social Security Number = address
steve
mike
john
bob
max
edward
Requires Memory size :
999999999999999
= 1E+15 = 1 petaoctet (Po)
John SSN : 125675798988090
8. Employees File SSN : Social Security Number
125675798988090
000000000000000
999999999999999
N element Array
SSN
00
99
steve
mike
john
bob
max
edward
125675798988090
100 employees
9. Employees File SSN : Social Security Number
125675798988090
000000000000000
999999999999999
N element Array
SSN
00
99
steve
mike
john
bob
max
edward
steve
bob
john
mike
edward125675798988090
10. Employees File SSN : Social Security Number
125675798988090
000000000000000
999999999999999
N element Array
SSN
00
99
steve
mike
john
bob
max
edward
steve
bob
john
mike
edward125675798988090
11. Employees File SSN : Social Security Number
125675798988090
000000000000000
999999999999999
steve
N element Array
00
99
KEY
hash
bob
john
mike
edward
value
addresses
steve
mike
john
bob
max
edward
16. Employees File
SSN : Social Security Number
125675798988090
000000000000000
999999999999999
john
N element Array
00
99
KEY
hash
bob
mike
edward
value
addresses
steve
mike
john
bob
max
edward
Key
space
Address
space
17. Key space to Address space
mapping
125675798988090
000000000000000
999999999999999
Address
space
Key
space
00
99
18. Key space to Address space
mapping
125675798988090
000000000000000
999999999999999
Address
space
Key
space
Index
00
99
20. Hash Function
The hash function is used to transform the key into the
index (the hash) of an array element (the slot or bucket)
where the corresponding value is to be stored and sought.
KEY HASH
index
Value
Bucket (slot)
21. Hash table
hash table is an array-based data structure.
129007
926647
975378
269908
Fred
Steve
Richard
Robert
Key Value
0
1
3
4
5
2
index
SSN
22. Hash table
hash function is used to convert the key into
the index of an array element, where
associated value is to be seek.
129007
926647
975378
269908
Fred
Steve
Richard
Robert
Key Value
h(129007)
h(129007)
h(975378)
h(269908)
0
1
3
4
5
2
index
SSN
buckets
23. Collision
If the hash function returns a slot that is
already occupied there is a collision
129007
975378
269908
Fred
Richard
Robert
Key Value
H(129007)
H(975378)
H(269908)
H(926647)
0
1
3
4
2
24. 0
1
3
4
5
2
hash clustering
When the distribution of keys into buckets is not random,
we say that the hash table exhibits clustering.
129007
975378
269908
Fred
Richard
Robert
Key Value
H(697803)
H(975378)
H(269908)
H(926647)
H(168477)
H(129007)
6
7
25. Hash function
Good Hash function provides uniform
distribution of hash values.
Poor hash function will cause collisions and
hash cluster.
29. Hash function toy implementation :
Modulo N R CAR(R) mod (11)
A 65 10
B 66 0
C 67 1
D 68 2
E 69 3
F 70 4
G 71 5
H 72 6
I 73 7
J 74 8
K 75 9
L 76 10
M 77 0
N 78 1
O 79 2
P 80 3
Q 81 4
R 82 5
S 83 6
T 84 7
U 85 8
V 86 9
W 87 10
X 88 0
Y 89 1
Z 90 2
26 => 11
31. Load Factor
Key Value
0 B 0
1 C 4
2 O 1
3 E 2
4 P 3
5 X 6
6 N 7
7 D 8
8 M 9
9
10 L 5
Key Value
0 B 0
1 C 4
2 O 1
3 E 2
4 P 3
5 X 6
6 N 7
7 D 8
8 M 9
9
10 L S
11
12
13
14
15
16
17
18
19
20
21
# elements in the hash Table
size of the hash table
48 %
91 %
32. Collision handling strategies
Closed addressing (open hashing).
Open addressing (closed hashing).
0
1
3
4
5
2
129007
975378
269908
Fred
Richard
Robert
Key Value
H(697803)
H(975378)
H(269908)
H(926647)
H(168477)
H(129007)
6
7
33. Open addressing (closed hashing).
When there is a collision, "Probe" the array to
find an empty slot after the occupied slot.
129007
926647
975378
269908
Fred
Steve
Richard
Robert
Key Value
H(697803)
H(975378)
H(269908)
H(926647)
168477 Phil
697803 Greg
H(168477)
H(129007)
34. Closed addressing (open hashing).
Each slot of the hash table contains a link to
another data structure.
129007
926647
975378
269908
Fred
Steve
168477 Phil
697803 Greg
Key
129007
975378 Richard
269908 Robert
35. Linear Hashing
• Linear Hashing
– Re-hash : hi (x) = (h(x) + i) mod B
• Stepsize : i
• i = 1,2,3, …
• Quadratic Hashing
– Re-hash : hi (x) = (h (x) + i ²) mod B
• Stepsize : i2
• i2 = 1,4,9,…
• Double Hashing
– Re-hash : hi (x) = (h(x) + i g (x)) mod B
• Stepsize : g(x)
37. modulo
Char Ascii Code
Value Key
RID R CAR(R) mod (11)
0 B 66 0
1 O 79 2
2 E 69 3
3 P 80 3
4 C 67 1
5 L 76 10
6 X 88 0
7 N 78 1
8 D 68 2
9 M 77 0
38. Class HashLinearProbing
Hash(key) returns hash
Put (key, value) inserts key value pair
Get (key) gets key value
Remove (key) removes key preserving bucket
structure.
39. Class HashMap JSE 1.4
Object get(Object key)
Returns the value to which the specified key is
mapped in this identity hash map, or null if the map
contains no mapping for this key.
Object put(Object key, Object value)
Associates the specified value with the specified key
in this map.
Object remove(Object key)
Removes the mapping for this key from this map if
present
40. Linear Probing toy implementation
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
KEY VAL
0
1
2
3
4
5
6
7
8
9
10
M
N
Relation Data Structure Implementation
Logical
Physical
41. Linear Probing toy implementation
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
KEY VAL
0
1
2
3
4
5
6
7
8
9
10
M
N
M > N
Empty Slot is
Search Stop Condition
42. Linear Probing toy implementation
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
KEY VAL
0
1
2
3
4
5
6
7
8
9
10
11
10
M > N
Empty Slot is
Search Stop Condition
43. Linear Probing
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
N 7
V 4
L 5
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Hash(key)
First
Empty
Slot ?
Put(N,7)
%M
Empty Slot is
Search Place Stop Condition
44. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
N 7
K 8
M 9
V 4
L 5
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Car Y = 89
Y mod 11 = 1
Hash(key)
Get(Y)
Y ?
Empty
Stop
Return (-1) Empty Slot is
Search Stop Condition
45. Linear Probing toy implementation
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
KEY VAL
0
1
2
3
4
5
6
7
8
9
10
11
10
M > N
Empty Slot is
Search Stop Condition
At least one empty slot
M – N = 1
46. Linear Probing
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
KEY VAL
0
1
2
3
4
5
6
7
8
9
10
M
N
47. Linear Probing
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
Example Relation
Implementation
48. Linear Probing
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
Hash(key) = CAR(R) Mod (M)
M = 11
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
49. Linear Probing
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
Hash(key)
Put(B,0)
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
50. Linear Probing
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
O 1
Hash(key)
Put(O,1)
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
51. Linear Probing
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
O 1
E 2
Hash(key)
Put(E,2)
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
52. Linear Probing
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
O 1
E 2
P 3
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Hash(key)
First
Empty
Slot ?
Put(P,3)
53. Linear Probing
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
O 1
E 2
P 3
V 4
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Hash(key)
Put(V,4)
54. Linear Probing
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
O 1
E 2
P 3
V 4
L 5
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Hash(key)
Put(L,5)
55. Linear Probing
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
V 4
L 5
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Hash(key)
First
Empty
Slot ?
Put(X,6)
%M
56. Linear Probing
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
N 7
V 4
L 5
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Hash(key)
First
Empty
Slot ?
Put(N,7)
%M
57. Linear Probing
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Hash(key)
First
Empty
Slot ?
Put(K,8)
%M
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
N 7
K 8
V 4
L 5
58. Linear Probing
Hash(key)
Put(M,9)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
N 7
K 8
M 9
V 4
L 5
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
First
Empty
Slot ?
0
2
3
3
9
10
0
1
9
0
59. Linear Probing
Hash(key)
Put(M,9)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
N 7
K 8
M 9
V 4
L 5
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
60. Linear Probing
Hash(key)
Put(M,9)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
N 7
K 8
M 9
V 4
L 5
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
61. Implementation of function Hash(Key)
In Java : Key % M
Specific case of Java char : in Java char are integer (Byte).
char: The char data type is a single 16-bit Unicode character. It has a minimum
value of 'u0000' (or 0) and a maximum value of 'uffff' (or 65,535 inclusive).
Null char is 0 (zero).
Default value for char is 0, or u0000.
Hash (Key) { Return Key Modulo M }
http://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html
63. Put(key, value) simplified algo
M = # bucket entries
index = hash (key)
While Key [index) != empty
index = (index + 1) % M
End while
Key [index] = key
Values [index] = value
65. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
N 7
K 8
M 9
V 4
L 5
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Hash(key)Hash(key)
Get(B)
B,0
B ?
66. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
N 7
K 8
M 9
V 4
L 5
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Hash(key)
Get(M)
M ?
M, 9
67. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
N 7
K 8
M 9
V 4
L 5
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Hash(key)
K ?
K,8
Get(K)
68. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
N 7
K 8
M 9
V 4
L 5
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Car Y = 89
Y mod 11 = 1
Hash(key)
Get(Y)
Y ?
Empty
Stop
Return (-1)
69. Get(key)
M = # buckets
index = hash (key)
valueToReturn = -1 // value to return if the key is not in the map
While Key [index] != key and Key [index] != empty
index = (index + 1) % M
End while
If (Key [index] = key) valueToReturn = Values [index]
Return valueToReturn
70. Remove (Key)
Remove (M)
Remove (N) : rehash end of the cluster.
Remove (L) : rehash end of the cluster.
71. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
N 7
K 8
M 9
V 4
L 5
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Hash(key)
Remove (M)
K(0) != M
Blank
Scan for M
72. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
N 7
K 8
V 4
L 5
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Hash(key)
Remove (M)
K(0) != M
Blank
Scan for M
73. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
N 7
K 8
M 9
V 4
L 5
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Hash(key)
Remove (N)
K(1) != N
Blank and rehash
End of cluster
Scan for N
74. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
N 7
K 8
M 9
V 4
L 5
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Cluster
Remove (N)
K(1) != N
Blank and rehash
End of cluster
Scan for N
75. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
K 8
M 9
V 4
L 5
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Remove (N)
K(1) != N
Blank and rehash
End of cluster
Scan for N
EOf
cluster
76. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
K 8
M 9
V 4
L 5
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Remove (N)
K(1) != N
Blank and rehash
End of cluster
Scan for N
EOf
cluster
Blank Key(6) , Val(6)
put(K,8)
77. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
M 9
V 4
L 5
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Remove (N)
K(1) != N
Blank and rehash
End of cluster
Scan for N
EOf
cluster
Blank Key(6) , Val(6)
put(K,8)
78. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
M 9
V 4
L 5
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Remove (N)
K(1) != N
Blank and rehash
End of cluster
Scan for N
Blank Key(6) , Val(6)
put(K,8)
79. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
M 9
V 4
L 5
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Remove (N)
K(1) != N
Blank and rehash
End of cluster
Scan for N
Blank Key(6), Val(6)
put(K,8)
80. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
K 8
M 9
V 4
L 5
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Remove (N)
K(1) != N
Blank and rehash
End of cluster
Scan for N
Blank Key(7) ,Val(7)
put(K,8)
81. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
K 8
M 9
V 4
L 5
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Remove (N)
K(1) != N
Blank and rehash
End of cluster
Scan for N
Blank Key(7) ,Val(7)
put(K,8)
82. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
K 8
V 4
L 5
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Remove (N)
K(1) != N
Blank and rehash
End of cluster
Scan for N
Blank Key(7) , Val(7)
put(M,9)
83. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
K 8
V 4
L 5
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Remove (N)
K(1) != N
Blank and rehash
End of cluster
Scan for N
Blank Key(7) , Val(7)
put(M,9)
First
Empty
Slot ?
84. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
K 8
9
V 4
L 5
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Remove (N)
K(1) != N
Blank and rehash
End of cluster
Scan for N
Blank Key(7) , Val(7)
put(M,9)
First
Empty
Slot ?
M
85. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
N 7
K 8
M 9
V 4
L 5
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Remove (L)
86. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
N 7
K 8
M 9
V 4
L 5
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
K(10) = L blank
Remove (L)
Blank and rehash
End of cluster
87. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
N 7
K 8
M 9
V 4
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
K(10) = L blank
Remove (L)
Blank and rehash
End of cluster
88. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
N 7
K 8
M 9
V 4
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
K(10) = L blank
Remove (L)
Blank and rehash
End of cluster
EOf
cluster
89. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
N 7
K 8
M 9
V 4
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Remove (L)
Blank and rehash
End of cluster
EOf
cluster
Blank Key(0) , Val(0)
put(B,0)
90. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
N 7
K 8
M 9
V 4
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Remove (L)
Blank and rehash
End of cluster
EOf
cluster
Blank Key(1) , Val(1)
put(X,6)
91. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
N 7
K 8
M 9
V 4
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Remove (L)
Blank and rehash
End of cluster
EOf
cluster
Blank Key(2) , Val(2)
put(O,1)
92. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
N 7
K 8
M 9
V 4
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Remove (L)
Blank and rehash
End of cluster
EOf
cluster
Blank Key(3) , Val(3)
put(E,2)
93. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
N 7
K 8
M 9
V 4
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Remove (L)
Blank and rehash
End of cluster
EOf
cluster
Blank Key(4), Val(4)
put(P,3)
94. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
N 7
K 8
M 9
V 4
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Remove (L)
Blank and rehash
End of cluster
EOf
cluster
Blank Key(5), Val(5)
put(N,7)
95. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
N 7
K 8
M 9
V 4
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Remove (L)
Blank and rehash
End of cluster
EOf
cluster
Blank Key(6) , Val(6)
put(K,8)
96. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
N 7
M 9
V 4
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Remove (L)
Blank and rehash
End of cluster
EOf
cluster
Blank Key(6) , Val(6)
put(K,8)
97. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
N 7
M 9
V 4
K 8
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Remove (L)
Blank and rehash
End of cluster
EOf
cluster
Blank Key(6) , Val(6)
put(K,8)
98. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
N 7
M 9
V 4
K 8
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Remove (L)
Blank and rehash
End of cluster
EOf
cluster
Blank Key(7) , Val(7)
put(M,9)
99. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
N 7
M 9
V 4
K 8
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Remove (L)
Blank and rehash
End of cluster
EOf
cluster
Blank Key(7) , Val(7)
put(M,9)
100. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
N 7
M 9
V 4
K 8
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Remove (L)
Blank and rehash
End of cluster
EOf
cluster
Blank Key(7) , Val(7)
put(M,9)
101. Linear Probing
Hash(key)
KEY VAL
B 00
1
2
3
4
5
6
7
8
9
10
X 6
O 1
E 2
P 3
N 7
M 9
V 4
K 8
Value Key
RID R
0 B
1 O
2 E
3 P
4 V
5 L
6 X
7 N
8 K
9 M
0
2
3
3
9
10
0
1
9
0
Remove (L)
Blank and rehash
End of cluster
EOf
cluster
Blank Key(7) , Val(7)
put(M,9)
102. Remove (key) simplified algo
M = # buckets
index = hash (key)
While Key [index) != key and Key [index) != empty
index = (index + 1) % M
End while
Key [index] = 0, Value [index] = 0
// rehash
index = (index + 1) % M
While Key [index) != empty
savedKey = Key [index], savedValue = Value [index]
Key [index] = 0 Value [index] = 0
Put ( savedKey , savedValue )
index = (index + 1) % M
End while