SlideShare a Scribd company logo
ANewApproach to Speed up Combinatorial
Search Strategies Using Stack and Hash Table
Data Engineering and Cloud Computing Department
Reva University
1
Outline
o Abstract
o Stack
o Algorithm of insertion in Stack :(PUSH)
o Algorithm of deletion in Stack :(POP)
o Hash Table
o Method
o Advantage
o Conclusion
2
Abstract
Owing to the significance of combinatorial search strategies both for academia and
industry, the introduction of new techniques is a fast growing research field these
days. Nonetheless, despite the kind of problem these approaches solve, they are
heavy computation with the number of combinations and growing search space
dimensions. This paper presents a new approach to speed up the generation and
search processes using a combination of stack and hash table data structures. This
approach could be put to practice for the combinatorial approaches to speed up the
generation of combinations and search process in the search space.
3
Stack
• A stack is a Last In, First Out (LIFO) data structure, objects inserted last are the
first to come out of the stack
• Anything added to the stack goes on the “top "of the stack
• Anything removed from the stack is taken from the “top” of the stack
• Things are removed in the reverse order from that in which they were inserted
4
ALGORITHM
OF
INSERTION
IN STACK:
(PUSH)
Procedure pushes an ITEM onto the stack
Step:1 [Stack already filled?]
If top=max, then: Print: OVERFLOW and Return.
Step:2[Increase TOP by 1]
Set Top=Top+1
Step:3 [Insert ITEM in new TOP position.]
Set STACK[TOP]:=ITEM
Step :4 Return
5
ALGORITHM
OF I
DELETION
IN STACK:
(POP)
Procedure deletes or popes an ITEM from the stack
Step 1: [Stack has an item to be removed?]
If top=0, then: Print: UNDERFLOW and Return.
Step 2: Set ITEM:=STACK [TOP].
Step 3:[Decrease TOP by 1]
Set TOP =TOP-1
Step 4: Return
6
Hash Table
 A hash table is a data structure that stores elements and allows insertions, lookups,
and deletions to be performed
 A hash table is an alternative method for representing a dictionary
 In a hash table, a hash function is used to map keys into positions in a table. This
act is called hashing
 Hash Table Operations
 Search: compute f(k) and see if a pair exists
 Insert: compute f(k) and place it in that position
 Delete: compute f(k) and delete the pair in that position
 In ideal situation, hash table search, insert or delete
7
Example
Let's see the following numbers or keys that you wanted to map into an array of 10
elements:
123456
123467
123450
To apply the division method, you could divide the number by 10 (or the maximum
number of elements in the array) and use the remainder (the modulo) as an index. The
following would result:
123456 % 10 = 6 (the remainder is 6 when dividing by 10)
123467 % 10 = 7 (the remainder is 7)
123450 % 10 = 0 (the remainder is 0)
These numbers would be inserted into the array at positions 6, 7, and 0 respectively. It
might look something like this:
8
Method
I. Additionally, a temporary array was created with index i to help the generated
combinations in each iteration (Steps 1-2).
II. A stack data structure (S) was created and the first parameter (0) was pushed
inside (Steps 3-4).
III. The algorithm continued to iterate until the stack became empty (Step 5).
IV. The index number i of the Comb array was set to length of S - 1 and the value v
of this index i was set to the top value in the stack (i.e. pop) until the v was less
than k (Steps 6-9).
V. Furthermore, the algorithm continued to increment the i and v then push the value
of v into S until the index number was equal to the length of the required
interaction strength t (Steps 9-15).
9
Method
Input: Input-parameters k and combination strength t
Output: All t-combinations of k where
k = k1, k2, k3, kn
1 Let Comb be an array of length t;
2 Let i be the index of Comb array;
3 Create a stack S;
4 S ← 0;
5 while S = null do
6 i =(the length of S - 1);
7 v = pop the stack value;
8 while pop value < k do
9 set Comb of index (i) to v;
10 i ← i + 1;
11 v ← v + 1;
12 push v to stack;
13 if i = t then
14 Add Comb to final array;
15 break;
10
Advantage
• Hashing provides a more reliable and flexible method of data retrieval than any
other data structure.
• It is faster than searching arrays and lists.
11
Conclusion
In this paper, we have presented our proposed approach to generate and search for the
interaction elements of the input parameters of the combinatorial search strategies.
Based on our experience with these strategies, the generation of input parameters
combinations and search for the interaction elements for the fitness function will
slow down the generation process of the final test suite of the interaction.
12
Thank you!
13

More Related Content

What's hot

Analog to digital converter
Analog to digital converterAnalog to digital converter
Magnetic Tape recorder
Magnetic Tape recorderMagnetic Tape recorder
Magnetic Tape recorder
vmr1124
 
Low pass filters
Low pass filtersLow pass filters
Low pass filters
kunwartouseef
 
Multirate DSP
Multirate DSPMultirate DSP
Multirate DSP
@zenafaris91
 
Transistor operating regions
Transistor operating regionsTransistor operating regions
Transistor operating regions
Vusi Maseko, M.Ed.
 
Digital Communication: Information Theory
Digital Communication: Information TheoryDigital Communication: Information Theory
Digital Communication: Information Theory
Dr. Sanjay M. Gulhane
 
Diode v i characteristic
Diode v i characteristicDiode v i characteristic
Diode v i characteristic
Unsa Shakir
 
Classes of amplifier
Classes of amplifierClasses of amplifier
Classes of amplifier
Gaditek
 
Schmitt trigger circuit
Schmitt trigger circuitSchmitt trigger circuit
Schmitt trigger circuit
taranjeet10
 
Non Linear Signal Processing
Non Linear Signal ProcessingNon Linear Signal Processing
Non Linear Signal Processing
TejasPrajapati25
 
PN JUNCTION
PN JUNCTION PN JUNCTION
PN JUNCTION
Mehedi Hasan
 
Pn junction
Pn junctionPn junction
Question Bank Basic Electronics
Question Bank Basic ElectronicsQuestion Bank Basic Electronics
Question Bank Basic Electronics
Nilesh Bhaskarrao Bahadure
 
Introduction to Analog signal
Introduction to Analog signalIntroduction to Analog signal
Introduction to Analog signal
Hirdesh Vishwdewa
 
Smith Chart by YEASIN NEWAJ
Smith Chart by YEASIN NEWAJ Smith Chart by YEASIN NEWAJ
Smith Chart by YEASIN NEWAJ
YeasinNewaj
 
Decoders
DecodersDecoders
Decoders
Re Man
 
Digital Signal Processing[ECEG-3171]-Ch1_L06
Digital Signal Processing[ECEG-3171]-Ch1_L06Digital Signal Processing[ECEG-3171]-Ch1_L06
Digital Signal Processing[ECEG-3171]-Ch1_L06
Rediet Moges
 
Electronics amplifiers
Electronics   amplifiersElectronics   amplifiers
Electronics amplifiers
sld1950
 
Super heterodyne receiver
Super heterodyne receiverSuper heterodyne receiver
Super heterodyne receiver
mpsrekha83
 
Varactor diode or varicap diode working and applications
Varactor diode or varicap diode working and applicationsVaractor diode or varicap diode working and applications
Varactor diode or varicap diode working and applications
elprocus
 

What's hot (20)

Analog to digital converter
Analog to digital converterAnalog to digital converter
Analog to digital converter
 
Magnetic Tape recorder
Magnetic Tape recorderMagnetic Tape recorder
Magnetic Tape recorder
 
Low pass filters
Low pass filtersLow pass filters
Low pass filters
 
Multirate DSP
Multirate DSPMultirate DSP
Multirate DSP
 
Transistor operating regions
Transistor operating regionsTransistor operating regions
Transistor operating regions
 
Digital Communication: Information Theory
Digital Communication: Information TheoryDigital Communication: Information Theory
Digital Communication: Information Theory
 
Diode v i characteristic
Diode v i characteristicDiode v i characteristic
Diode v i characteristic
 
Classes of amplifier
Classes of amplifierClasses of amplifier
Classes of amplifier
 
Schmitt trigger circuit
Schmitt trigger circuitSchmitt trigger circuit
Schmitt trigger circuit
 
Non Linear Signal Processing
Non Linear Signal ProcessingNon Linear Signal Processing
Non Linear Signal Processing
 
PN JUNCTION
PN JUNCTION PN JUNCTION
PN JUNCTION
 
Pn junction
Pn junctionPn junction
Pn junction
 
Question Bank Basic Electronics
Question Bank Basic ElectronicsQuestion Bank Basic Electronics
Question Bank Basic Electronics
 
Introduction to Analog signal
Introduction to Analog signalIntroduction to Analog signal
Introduction to Analog signal
 
Smith Chart by YEASIN NEWAJ
Smith Chart by YEASIN NEWAJ Smith Chart by YEASIN NEWAJ
Smith Chart by YEASIN NEWAJ
 
Decoders
DecodersDecoders
Decoders
 
Digital Signal Processing[ECEG-3171]-Ch1_L06
Digital Signal Processing[ECEG-3171]-Ch1_L06Digital Signal Processing[ECEG-3171]-Ch1_L06
Digital Signal Processing[ECEG-3171]-Ch1_L06
 
Electronics amplifiers
Electronics   amplifiersElectronics   amplifiers
Electronics amplifiers
 
Super heterodyne receiver
Super heterodyne receiverSuper heterodyne receiver
Super heterodyne receiver
 
Varactor diode or varicap diode working and applications
Varactor diode or varicap diode working and applicationsVaractor diode or varicap diode working and applications
Varactor diode or varicap diode working and applications
 

Viewers also liked

Fraud and Risk in Big Data
Fraud and Risk in Big DataFraud and Risk in Big Data
Fraud and Risk in Big Data
Umma Khatuna Jannat
 
Data Warehousing Implementation Issues
Data Warehousing Implementation IssuesData Warehousing Implementation Issues
Data Warehousing Implementation Issues
Umma Khatuna Jannat
 
Things to Consider for Improvement of Usability of E-Commerce in Context of B...
Things to Consider for Improvement of Usability of E-Commerce in Context of B...Things to Consider for Improvement of Usability of E-Commerce in Context of B...
Things to Consider for Improvement of Usability of E-Commerce in Context of B...
Umma Khatuna Jannat
 
String Searching and Matching
String Searching and MatchingString Searching and Matching
String Searching and Matching
Umma Khatuna Jannat
 
Parallel Computing
Parallel Computing Parallel Computing
Parallel Computing
Umma Khatuna Jannat
 
lecture 26
lecture 26lecture 26
lecture 26
sajinsc
 
Sam smith analysis
Sam smith analysisSam smith analysis
Sam smith analysis
VanessaSultan17
 
Stressen's matrix multiplication
Stressen's matrix multiplicationStressen's matrix multiplication
Stressen's matrix multiplication
Kumar
 
Activity selection problem
Activity selection problemActivity selection problem
Activity selection problem
fika sweety
 
Activity selection problem
Activity selection problemActivity selection problem
Activity selection problem
Sumita Das
 
Activity selection problem class 12
Activity selection problem class 12Activity selection problem class 12
Activity selection problem class 12
Kumar
 
Lecture 5: Asymptotic analysis of algorithms
Lecture 5: Asymptotic analysis of algorithmsLecture 5: Asymptotic analysis of algorithms
Lecture 5: Asymptotic analysis of algorithms
Vivek Bhargav
 
Matrix Multiplication(An example of concurrent programming)
Matrix Multiplication(An example of concurrent programming)Matrix Multiplication(An example of concurrent programming)
Matrix Multiplication(An example of concurrent programming)
Pramit Kumar
 
Matrix multiplication
Matrix multiplicationMatrix multiplication
Matrix multiplication
International Islamic University
 
strassen matrix multiplication algorithm
strassen matrix multiplication algorithmstrassen matrix multiplication algorithm
strassen matrix multiplication algorithm
evil eye
 
BFS
BFSBFS
Divide and conquer 1
Divide and conquer 1Divide and conquer 1
Divide and conquer 1
Kumar
 
Breadth first search
Breadth first searchBreadth first search
Breadth first search
Vignesh Prasanna
 
DFS and BFS
DFS and BFSDFS and BFS
DFS and BFS
satya parsana
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notations
Nikhil Sharma
 

Viewers also liked (20)

Fraud and Risk in Big Data
Fraud and Risk in Big DataFraud and Risk in Big Data
Fraud and Risk in Big Data
 
Data Warehousing Implementation Issues
Data Warehousing Implementation IssuesData Warehousing Implementation Issues
Data Warehousing Implementation Issues
 
Things to Consider for Improvement of Usability of E-Commerce in Context of B...
Things to Consider for Improvement of Usability of E-Commerce in Context of B...Things to Consider for Improvement of Usability of E-Commerce in Context of B...
Things to Consider for Improvement of Usability of E-Commerce in Context of B...
 
String Searching and Matching
String Searching and MatchingString Searching and Matching
String Searching and Matching
 
Parallel Computing
Parallel Computing Parallel Computing
Parallel Computing
 
lecture 26
lecture 26lecture 26
lecture 26
 
Sam smith analysis
Sam smith analysisSam smith analysis
Sam smith analysis
 
Stressen's matrix multiplication
Stressen's matrix multiplicationStressen's matrix multiplication
Stressen's matrix multiplication
 
Activity selection problem
Activity selection problemActivity selection problem
Activity selection problem
 
Activity selection problem
Activity selection problemActivity selection problem
Activity selection problem
 
Activity selection problem class 12
Activity selection problem class 12Activity selection problem class 12
Activity selection problem class 12
 
Lecture 5: Asymptotic analysis of algorithms
Lecture 5: Asymptotic analysis of algorithmsLecture 5: Asymptotic analysis of algorithms
Lecture 5: Asymptotic analysis of algorithms
 
Matrix Multiplication(An example of concurrent programming)
Matrix Multiplication(An example of concurrent programming)Matrix Multiplication(An example of concurrent programming)
Matrix Multiplication(An example of concurrent programming)
 
Matrix multiplication
Matrix multiplicationMatrix multiplication
Matrix multiplication
 
strassen matrix multiplication algorithm
strassen matrix multiplication algorithmstrassen matrix multiplication algorithm
strassen matrix multiplication algorithm
 
BFS
BFSBFS
BFS
 
Divide and conquer 1
Divide and conquer 1Divide and conquer 1
Divide and conquer 1
 
Breadth first search
Breadth first searchBreadth first search
Breadth first search
 
DFS and BFS
DFS and BFSDFS and BFS
DFS and BFS
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notations
 

Similar to Stack and Hash Table

Hashing Technique In Data Structures
Hashing Technique In Data StructuresHashing Technique In Data Structures
Hashing Technique In Data Structures
SHAKOOR AB
 
Algorithms notes tutorials duniya
Algorithms notes   tutorials duniyaAlgorithms notes   tutorials duniya
Algorithms notes tutorials duniya
TutorialsDuniya.com
 
Ch17 Hashing
Ch17 HashingCh17 Hashing
Ch17 Hashing
leminhvuong
 
stack.ppt
stack.pptstack.ppt
stack.ppt
ssuserec1395
 
Ds
DsDs
Ds
Acad
 
Hashing and File Structures in Data Structure.pdf
Hashing and File Structures in Data Structure.pdfHashing and File Structures in Data Structure.pdf
Hashing and File Structures in Data Structure.pdf
JaithoonBibi
 
03 stacks and_queues_using_arrays
03 stacks and_queues_using_arrays03 stacks and_queues_using_arrays
03 stacks and_queues_using_arrays
tameemyousaf
 
Hashing
HashingHashing
Hashing
amoldkul
 
stacks and queues for public
stacks and queues for publicstacks and queues for public
stacks and queues for public
iqbalphy1
 
stack_presentaton_HUSNAIN[2].pojklklklptx
stack_presentaton_HUSNAIN[2].pojklklklptxstack_presentaton_HUSNAIN[2].pojklklklptx
stack_presentaton_HUSNAIN[2].pojklklklptx
HusnainNaqvi2
 
Efficient top k retrieval on massive data
Efficient top k retrieval on massive dataEfficient top k retrieval on massive data
Efficient top k retrieval on massive data
Pvrtechnologies Nellore
 
My lecture stack_queue_operation
My lecture stack_queue_operationMy lecture stack_queue_operation
My lecture stack_queue_operation
Senthil Kumar
 
STACK.pptx
STACK.pptxSTACK.pptx
STACK.pptx
Dr.Shweta
 
What is Stack, Its Operations, Queue, Circular Queue, Priority Queue
What is Stack, Its Operations, Queue, Circular Queue, Priority QueueWhat is Stack, Its Operations, Queue, Circular Queue, Priority Queue
What is Stack, Its Operations, Queue, Circular Queue, Priority Queue
Balwant Gorad
 
4.4 hashing02
4.4 hashing024.4 hashing02
4.4 hashing02
Krish_ver2
 
Advance algorithm hashing lec II
Advance algorithm hashing lec IIAdvance algorithm hashing lec II
Advance algorithm hashing lec II
Sajid Marwat
 
Assg 05 QuicksortCOSC 2336 Data StructuresObjectives.docx
Assg 05 QuicksortCOSC 2336 Data StructuresObjectives.docxAssg 05 QuicksortCOSC 2336 Data StructuresObjectives.docx
Assg 05 QuicksortCOSC 2336 Data StructuresObjectives.docx
jane3dyson92312
 
Assg 05 QuicksortCOSC 2336 Data StructuresObjectives.docx
Assg 05 QuicksortCOSC 2336 Data StructuresObjectives.docxAssg 05 QuicksortCOSC 2336 Data StructuresObjectives.docx
Assg 05 QuicksortCOSC 2336 Data StructuresObjectives.docx
festockton
 
Stack linked list
Stack linked listStack linked list
Stack linked list
bhargav0077
 
Data Structure In C#
Data Structure In C#Data Structure In C#
Data Structure In C#
Shahzad
 

Similar to Stack and Hash Table (20)

Hashing Technique In Data Structures
Hashing Technique In Data StructuresHashing Technique In Data Structures
Hashing Technique In Data Structures
 
Algorithms notes tutorials duniya
Algorithms notes   tutorials duniyaAlgorithms notes   tutorials duniya
Algorithms notes tutorials duniya
 
Ch17 Hashing
Ch17 HashingCh17 Hashing
Ch17 Hashing
 
stack.ppt
stack.pptstack.ppt
stack.ppt
 
Ds
DsDs
Ds
 
Hashing and File Structures in Data Structure.pdf
Hashing and File Structures in Data Structure.pdfHashing and File Structures in Data Structure.pdf
Hashing and File Structures in Data Structure.pdf
 
03 stacks and_queues_using_arrays
03 stacks and_queues_using_arrays03 stacks and_queues_using_arrays
03 stacks and_queues_using_arrays
 
Hashing
HashingHashing
Hashing
 
stacks and queues for public
stacks and queues for publicstacks and queues for public
stacks and queues for public
 
stack_presentaton_HUSNAIN[2].pojklklklptx
stack_presentaton_HUSNAIN[2].pojklklklptxstack_presentaton_HUSNAIN[2].pojklklklptx
stack_presentaton_HUSNAIN[2].pojklklklptx
 
Efficient top k retrieval on massive data
Efficient top k retrieval on massive dataEfficient top k retrieval on massive data
Efficient top k retrieval on massive data
 
My lecture stack_queue_operation
My lecture stack_queue_operationMy lecture stack_queue_operation
My lecture stack_queue_operation
 
STACK.pptx
STACK.pptxSTACK.pptx
STACK.pptx
 
What is Stack, Its Operations, Queue, Circular Queue, Priority Queue
What is Stack, Its Operations, Queue, Circular Queue, Priority QueueWhat is Stack, Its Operations, Queue, Circular Queue, Priority Queue
What is Stack, Its Operations, Queue, Circular Queue, Priority Queue
 
4.4 hashing02
4.4 hashing024.4 hashing02
4.4 hashing02
 
Advance algorithm hashing lec II
Advance algorithm hashing lec IIAdvance algorithm hashing lec II
Advance algorithm hashing lec II
 
Assg 05 QuicksortCOSC 2336 Data StructuresObjectives.docx
Assg 05 QuicksortCOSC 2336 Data StructuresObjectives.docxAssg 05 QuicksortCOSC 2336 Data StructuresObjectives.docx
Assg 05 QuicksortCOSC 2336 Data StructuresObjectives.docx
 
Assg 05 QuicksortCOSC 2336 Data StructuresObjectives.docx
Assg 05 QuicksortCOSC 2336 Data StructuresObjectives.docxAssg 05 QuicksortCOSC 2336 Data StructuresObjectives.docx
Assg 05 QuicksortCOSC 2336 Data StructuresObjectives.docx
 
Stack linked list
Stack linked listStack linked list
Stack linked list
 
Data Structure In C#
Data Structure In C#Data Structure In C#
Data Structure In C#
 

Recently uploaded

Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
abbyasa1014
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
mahammadsalmanmech
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
MIGUELANGEL966976
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
Yasser Mahgoub
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
Hitesh Mohapatra
 
Heat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation pptHeat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation ppt
mamunhossenbd75
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
gerogepatton
 
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMSA SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
IJNSA Journal
 
Casting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdfCasting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdf
zubairahmad848137
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
sachin chaurasia
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
ihlasbinance2003
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
171ticu
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
RadiNasr
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
IJECEIAES
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
Textile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdfTextile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdf
NazakatAliKhoso2
 

Recently uploaded (20)

Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
 
Heat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation pptHeat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation ppt
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMSA SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
 
Casting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdfCasting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdf
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
Textile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdfTextile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdf
 

Stack and Hash Table

  • 1. ANewApproach to Speed up Combinatorial Search Strategies Using Stack and Hash Table Data Engineering and Cloud Computing Department Reva University 1
  • 2. Outline o Abstract o Stack o Algorithm of insertion in Stack :(PUSH) o Algorithm of deletion in Stack :(POP) o Hash Table o Method o Advantage o Conclusion 2
  • 3. Abstract Owing to the significance of combinatorial search strategies both for academia and industry, the introduction of new techniques is a fast growing research field these days. Nonetheless, despite the kind of problem these approaches solve, they are heavy computation with the number of combinations and growing search space dimensions. This paper presents a new approach to speed up the generation and search processes using a combination of stack and hash table data structures. This approach could be put to practice for the combinatorial approaches to speed up the generation of combinations and search process in the search space. 3
  • 4. Stack • A stack is a Last In, First Out (LIFO) data structure, objects inserted last are the first to come out of the stack • Anything added to the stack goes on the “top "of the stack • Anything removed from the stack is taken from the “top” of the stack • Things are removed in the reverse order from that in which they were inserted 4
  • 5. ALGORITHM OF INSERTION IN STACK: (PUSH) Procedure pushes an ITEM onto the stack Step:1 [Stack already filled?] If top=max, then: Print: OVERFLOW and Return. Step:2[Increase TOP by 1] Set Top=Top+1 Step:3 [Insert ITEM in new TOP position.] Set STACK[TOP]:=ITEM Step :4 Return 5
  • 6. ALGORITHM OF I DELETION IN STACK: (POP) Procedure deletes or popes an ITEM from the stack Step 1: [Stack has an item to be removed?] If top=0, then: Print: UNDERFLOW and Return. Step 2: Set ITEM:=STACK [TOP]. Step 3:[Decrease TOP by 1] Set TOP =TOP-1 Step 4: Return 6
  • 7. Hash Table  A hash table is a data structure that stores elements and allows insertions, lookups, and deletions to be performed  A hash table is an alternative method for representing a dictionary  In a hash table, a hash function is used to map keys into positions in a table. This act is called hashing  Hash Table Operations  Search: compute f(k) and see if a pair exists  Insert: compute f(k) and place it in that position  Delete: compute f(k) and delete the pair in that position  In ideal situation, hash table search, insert or delete 7
  • 8. Example Let's see the following numbers or keys that you wanted to map into an array of 10 elements: 123456 123467 123450 To apply the division method, you could divide the number by 10 (or the maximum number of elements in the array) and use the remainder (the modulo) as an index. The following would result: 123456 % 10 = 6 (the remainder is 6 when dividing by 10) 123467 % 10 = 7 (the remainder is 7) 123450 % 10 = 0 (the remainder is 0) These numbers would be inserted into the array at positions 6, 7, and 0 respectively. It might look something like this: 8
  • 9. Method I. Additionally, a temporary array was created with index i to help the generated combinations in each iteration (Steps 1-2). II. A stack data structure (S) was created and the first parameter (0) was pushed inside (Steps 3-4). III. The algorithm continued to iterate until the stack became empty (Step 5). IV. The index number i of the Comb array was set to length of S - 1 and the value v of this index i was set to the top value in the stack (i.e. pop) until the v was less than k (Steps 6-9). V. Furthermore, the algorithm continued to increment the i and v then push the value of v into S until the index number was equal to the length of the required interaction strength t (Steps 9-15). 9
  • 10. Method Input: Input-parameters k and combination strength t Output: All t-combinations of k where k = k1, k2, k3, kn 1 Let Comb be an array of length t; 2 Let i be the index of Comb array; 3 Create a stack S; 4 S ← 0; 5 while S = null do 6 i =(the length of S - 1); 7 v = pop the stack value; 8 while pop value < k do 9 set Comb of index (i) to v; 10 i ← i + 1; 11 v ← v + 1; 12 push v to stack; 13 if i = t then 14 Add Comb to final array; 15 break; 10
  • 11. Advantage • Hashing provides a more reliable and flexible method of data retrieval than any other data structure. • It is faster than searching arrays and lists. 11
  • 12. Conclusion In this paper, we have presented our proposed approach to generate and search for the interaction elements of the input parameters of the combinatorial search strategies. Based on our experience with these strategies, the generation of input parameters combinations and search for the interaction elements for the fitness function will slow down the generation process of the final test suite of the interaction. 12