SlideShare a Scribd company logo
1 of 6
Class Assignment




                  CLASS ASSIGNMENT-01
                    Parallel Searching Algorithms




INTRODUCTION:
Parallel Search, also known as Multithreaded Search or SMP Search, is a way to increase
search speed by using additional processors. This topic that has been gaining popularity
recently with multiprocessor computers becoming widely available.

Actually, a parallel algorithm is an algorithm which can be executed a piece at a time on
many different processing devices, and then put back together again at the end to get the
correct result.

The cost or complexity of serial algorithms is estimated in terms of the space (memory)
and time (processor cycles) that they take. Parallel algorithms need to optimize one more
resource, the communication between different processors. There are two ways parallel
processors communicating, shared memory or message passing.

This document gives a brief summary of four types SMP algorithms which are classified by
their scalability (trend in search speed as the number of processors becomes large) and
their speedup (change in time to complete a search). Typically, programmers use scaling
to mean change in nodes per second (NPS) rates, and speedup to mean change in time to
depth. The algorithms are described below in brief:




                                                                               Page 1 of 6
Class Assignment

ALPHA – BETA SEARCH:

The Alpha-Beta algorithm (Alpha-Beta Pruning, Alpha-Beta Heuristic) is a significant
enhancement to the minimax search algorithm that eliminates the need to search large
portions of the game tree applying a branch-and-bound technique. Remarkably, it does
this without any potential of overlooking a better move. If one already has found a quite
good move and search for alternatives, one refutation is enough to avoid it. No need to look
for even stronger refutations.

Actually, the algorithm maintains two values, alpha and beta. They represent the minimum
score that the maximizing player is assured of and the maximum score that the minimizing
player is assured of respectively.




IMPLEMENTATION:

int alphaBetaMax( int alpha, int beta, int depthleft )
{
if ( depthleft == 0 ) return evaluate();
for ( all moves)
{
score = alphaBetaMin( alpha, beta, depthleft - 1 );
if( score >= beta )
return beta; // fail hard beta-cutoff
if( score > alpha )
alpha = score; // alpha acts like max in MiniMax
}
return alpha;
}

int alphaBetaMin( int alpha, int beta, int depthleft )
{
if ( depthleft == 0 ) return -evaluate();
for ( all moves)
 {
score = alphaBetaMax( alpha, beta, depthleft - 1 );
if( score <= alpha )
return alpha; // fail hard alpha-cutoff
if( score < beta )

                                                                                  Page 2 of 6
Class Assignment

beta = score; // beta acts like min in MiniMax
}
return beta;
}




JAMBOREE SEARCH:

Jamboree Search was introduced by Bradley Kuszmaul in his 1994 thesis, Synchronized
MIMD Computing. This algorithm is actually a parallelized version of the Scout search
algorithm. The idea is that all of the testing of any child that is not the first one is done in
parallel and any test that fail are sequentially valued.



Jamboree was used in the massive parallel chess programs StarTech and Socrates. It
sequentialize full-window searches for values, because, while their authors are willing to
take a chance that an empty window search will be squandered work, they are not willing
to take the chance that a full-window search (which does not prune very much) will be
squandered work.



IMPLEMENTATION:

int jamboree(CNode n, int α, int β)
{
if (n is leaf) return static_eval(n);
c[ ] = the childen of n;
b = -jamboree(c[0], -β, -α);
if (b >= β) return b;
if (b > α) α = b;
In Parallel: for (i=1; i < |c[ ]|; i++)
{
s = -jamboree(c[i], -α - 1, -α);
if (s > b) b = s;
if (s >= β) abort_and_return s;
if (s > α)
 {
s = -jamboree(c[i], -β, -α);
if (s >= β) abort_and_return s;
if (s > α) α = s;

                                                                                     Page 3 of 6
Class Assignment

if (s > b) b = s;
}
}
return b;
}



DEPTH – FIRST SEARCH:

We start the graph traversal at an arbitrary vertex and go down a particular branch until
we reach a dead end. Then we back up and go as deep possible. In this way we visit all
vertices and edges as well.




The search is similar to searching maze of hallways, edges, and rooms, vertices, with a
string and paint. We fix the string in the starting we room and mark the room with the
paint as visited we then go down the an incident hallway into the next room. We mark that
room and go to the next room always marking the rooms as visited with the paint. When
we get to a dead end or a room we have already visited we follow the string back a room
that has a hall way we have not gone through yet.

 This graph traversal is very similar to a tree traversal; either post order or preorder, in fact
if the graph is a tree then the traversal is same. The algorithm is naturally recursive, just as
the tree traversal. The algorithm is forecast here:

IMPLEMENTATION:

Algorithm DFS (graph G, Vertex v)

// Recursive algorithm

for all edges e in G.incidentEdges(v) do

if edge e is unexplored then

w = G.opposite(v, e)

if vertex w is unexplored then

label e as discovery edge

                                                                                      Page 4 of 6
Class Assignment

recursively call DFS(G, w)

else

label e back edge.




PVS SEARCH:
The best-known early attempt at searching such trees in parallel was the Principal
Variation Splitting (PVS) algorithm. This was both simple to understand and easy to
implement.




When starting an N-ply search, one processor generates the moves at the root position,
makes the first move (leading to what is often referred to as the left-most descendent
position), then generates the moves at ply=2, makes the first move again, and continues
this until reaching ply=N.

 At this point, the processor pool searches all of the moves at this ply (N) in parallel, and the
best value is backed up to ply N-1. Now that the lower bound for ply N-1 is known, the rest
of the moves at N-1 are searched in parallel, and the best value again backed up to N-2. This
continues until the first root move has been searched and the value is known. The
remainder of the root moves is searched in parallel, until none are left. The next iteration is
started and the process repeats for depth N+1.

Performance analysis with this algorithm (PVS) produced speedups given below in table 1.

            +-------------+-----+-----+-----+-----+-----+
            |# processors | 1 | 2 | 4 | 8 | 16 |
            +-------------+-----+-----+-----+-----+-----+
            |speedup      | 1.0 | 1.8 | 3.0 | 4.1 | 4.6 |
            +-------------+-----+-----+-----+-----+-----+
                  Table 1 PVS performance results




                                                                                      Page 5 of 6
Class Assignment



DRAWBACKS:

Firstly,

All of the processors work together at a single node, searching descendent positions in
parallel. If the number of possible moves is small, or the number of processors is large,
some have nothing to do. Second, every branch from a given position does not produce a
tree of equal size, since some branches may grow into complicated positions with lots of
checks and search extensions that make the tree very large, while other branches grow into
simple positions that are searched quickly. This leads to a load balancing problem where
one processor begins searching a very large tree and the others finish the easy moves and
have to wait for the remaining processor to slowly traverse the tree.

Secondly,

With a reasonable number of processors, the speedup can look very bad if most of the time
many of the processors are waiting on one last node to be completed before they can back
up to ply N-1 and start to work there.




REFERENCE:

[1] http://chessprogramming.wikispaces.com/Parallel+Search

[2] http://chessprogramming.wikispaces.com/Jamboree

[3] http://chessprogramming.wikispaces.com/Alpha-Beta

[4] http://www.netlib.org/utk/lsi/pcwLSI/text/node350.html

[5] http://www-turbul.ifh.uni-karlsruhe.de/uhlmann/mpi3/report_6.html

[6] http://www.cis.uab.edu/hyatt/search.html


……………………………………………………..X……………………………………………………….


                                                                                Page 6 of 6

More Related Content

What's hot

Fundamentals of the Analysis of Algorithm Efficiency
Fundamentals of the Analysis of Algorithm EfficiencyFundamentals of the Analysis of Algorithm Efficiency
Fundamentals of the Analysis of Algorithm EfficiencySaranya Natarajan
 
Dichotomy of parallel computing platforms
Dichotomy of parallel computing platformsDichotomy of parallel computing platforms
Dichotomy of parallel computing platformsSyed Zaid Irshad
 
daa-unit-3-greedy method
daa-unit-3-greedy methoddaa-unit-3-greedy method
daa-unit-3-greedy methodhodcsencet
 
Algorithm And analysis Lecture 03& 04-time complexity.
 Algorithm And analysis Lecture 03& 04-time complexity. Algorithm And analysis Lecture 03& 04-time complexity.
Algorithm And analysis Lecture 03& 04-time complexity.Tariq Khan
 
Distributed system lamport's and vector algorithm
Distributed system lamport's and vector algorithmDistributed system lamport's and vector algorithm
Distributed system lamport's and vector algorithmpinki soni
 
Lecture 2 more about parallel computing
Lecture 2   more about parallel computingLecture 2   more about parallel computing
Lecture 2 more about parallel computingVajira Thambawita
 
backtracking algorithms of ada
backtracking algorithms of adabacktracking algorithms of ada
backtracking algorithms of adaSahil Kumar
 
Stressen's matrix multiplication
Stressen's matrix multiplicationStressen's matrix multiplication
Stressen's matrix multiplicationKumar
 
Clock synchronization in distributed system
Clock synchronization in distributed systemClock synchronization in distributed system
Clock synchronization in distributed systemSunita Sahu
 
Deadlock in distribute system by saeed siddik
Deadlock in distribute system by saeed siddikDeadlock in distribute system by saeed siddik
Deadlock in distribute system by saeed siddikSaeed Siddik
 
Finite automata-for-lexical-analysis
Finite automata-for-lexical-analysisFinite automata-for-lexical-analysis
Finite automata-for-lexical-analysisDattatray Gandhmal
 

What's hot (20)

14 query processing-sorting
14 query processing-sorting14 query processing-sorting
14 query processing-sorting
 
Brute force method
Brute force methodBrute force method
Brute force method
 
Fundamentals of the Analysis of Algorithm Efficiency
Fundamentals of the Analysis of Algorithm EfficiencyFundamentals of the Analysis of Algorithm Efficiency
Fundamentals of the Analysis of Algorithm Efficiency
 
Dichotomy of parallel computing platforms
Dichotomy of parallel computing platformsDichotomy of parallel computing platforms
Dichotomy of parallel computing platforms
 
daa-unit-3-greedy method
daa-unit-3-greedy methoddaa-unit-3-greedy method
daa-unit-3-greedy method
 
Algorithm And analysis Lecture 03& 04-time complexity.
 Algorithm And analysis Lecture 03& 04-time complexity. Algorithm And analysis Lecture 03& 04-time complexity.
Algorithm And analysis Lecture 03& 04-time complexity.
 
Distributed system lamport's and vector algorithm
Distributed system lamport's and vector algorithmDistributed system lamport's and vector algorithm
Distributed system lamport's and vector algorithm
 
Lecture 2 more about parallel computing
Lecture 2   more about parallel computingLecture 2   more about parallel computing
Lecture 2 more about parallel computing
 
Message passing in Distributed Computing Systems
Message passing in Distributed Computing SystemsMessage passing in Distributed Computing Systems
Message passing in Distributed Computing Systems
 
backtracking algorithms of ada
backtracking algorithms of adabacktracking algorithms of ada
backtracking algorithms of ada
 
Concurrency control
Concurrency controlConcurrency control
Concurrency control
 
Stressen's matrix multiplication
Stressen's matrix multiplicationStressen's matrix multiplication
Stressen's matrix multiplication
 
Clock synchronization in distributed system
Clock synchronization in distributed systemClock synchronization in distributed system
Clock synchronization in distributed system
 
Parallel Algorithms
Parallel AlgorithmsParallel Algorithms
Parallel Algorithms
 
Deadlock in distribute system by saeed siddik
Deadlock in distribute system by saeed siddikDeadlock in distribute system by saeed siddik
Deadlock in distribute system by saeed siddik
 
Finite automata-for-lexical-analysis
Finite automata-for-lexical-analysisFinite automata-for-lexical-analysis
Finite automata-for-lexical-analysis
 
Amdahl`s law -Processor performance
Amdahl`s law -Processor performanceAmdahl`s law -Processor performance
Amdahl`s law -Processor performance
 
Sorting algorithms
Sorting algorithmsSorting algorithms
Sorting algorithms
 
Parallel Algorithms
Parallel AlgorithmsParallel Algorithms
Parallel Algorithms
 
Unit 2 in daa
Unit 2 in daaUnit 2 in daa
Unit 2 in daa
 

Viewers also liked (20)

Parallel sorting algorithm
Parallel sorting algorithmParallel sorting algorithm
Parallel sorting algorithm
 
Mediator pattern
Mediator patternMediator pattern
Mediator pattern
 
Clustering manual
Clustering manualClustering manual
Clustering manual
 
Observer pattern
Observer patternObserver pattern
Observer pattern
 
Parallel computing chapter 2
Parallel computing chapter 2Parallel computing chapter 2
Parallel computing chapter 2
 
Parallel computing chapter 3
Parallel computing chapter 3Parallel computing chapter 3
Parallel computing chapter 3
 
Parallel computing(2)
Parallel computing(2)Parallel computing(2)
Parallel computing(2)
 
Bengali optical character recognition system
Bengali optical character recognition systemBengali optical character recognition system
Bengali optical character recognition system
 
Search algorithms master
Search algorithms masterSearch algorithms master
Search algorithms master
 
Problems in parallel computations of tree functions
Problems in parallel computations of tree functionsProblems in parallel computations of tree functions
Problems in parallel computations of tree functions
 
parallel Merging
parallel Mergingparallel Merging
parallel Merging
 
R with excel
R with excelR with excel
R with excel
 
Map reduce
Map reduceMap reduce
Map reduce
 
Apache hadoop & map reduce
Apache hadoop & map reduceApache hadoop & map reduce
Apache hadoop & map reduce
 
Nmdl final pp 1
Nmdl final pp 1Nmdl final pp 1
Nmdl final pp 1
 
Icons presentation
Icons presentationIcons presentation
Icons presentation
 
New microsoft office word 97 2003 document
New microsoft office word 97   2003 documentNew microsoft office word 97   2003 document
New microsoft office word 97 2003 document
 
Twitter
TwitterTwitter
Twitter
 
Big data
Big dataBig data
Big data
 
Strategy pattern.pdf
Strategy pattern.pdfStrategy pattern.pdf
Strategy pattern.pdf
 

Similar to Parallel searching

Exploring Algorithms
Exploring AlgorithmsExploring Algorithms
Exploring AlgorithmsSri Prasanna
 
Java Algorithm Interview Questions & Answers .pdf
Java Algorithm Interview Questions & Answers .pdfJava Algorithm Interview Questions & Answers .pdf
Java Algorithm Interview Questions & Answers .pdfNiravPanchal50
 
Data structures arrays
Data structures   arraysData structures   arrays
Data structures arraysmaamir farooq
 
Minmax and alpha beta pruning.pptx
Minmax and alpha beta pruning.pptxMinmax and alpha beta pruning.pptx
Minmax and alpha beta pruning.pptxPriyadharshiniG41
 
Unit 2 Modeling of Programs A function maps inputs to out.docx
Unit 2 Modeling of Programs A function maps inputs to out.docxUnit 2 Modeling of Programs A function maps inputs to out.docx
Unit 2 Modeling of Programs A function maps inputs to out.docxdickonsondorris
 
Advanced data structures using c++ 3
Advanced data structures using c++ 3Advanced data structures using c++ 3
Advanced data structures using c++ 3Shaili Choudhary
 
Sorting Seminar Presentation by Ashin Guha Majumder
Sorting Seminar Presentation by Ashin Guha MajumderSorting Seminar Presentation by Ashin Guha Majumder
Sorting Seminar Presentation by Ashin Guha MajumderAshin Guha Majumder
 
Bidirectional graph search techniques for finding shortest path in image base...
Bidirectional graph search techniques for finding shortest path in image base...Bidirectional graph search techniques for finding shortest path in image base...
Bidirectional graph search techniques for finding shortest path in image base...Navin Kumar
 
Data Structures in C
Data Structures in CData Structures in C
Data Structures in CJabs6
 

Similar to Parallel searching (20)

Parallel search
Parallel searchParallel search
Parallel search
 
Exploring Algorithms
Exploring AlgorithmsExploring Algorithms
Exploring Algorithms
 
jfs-masters-1
jfs-masters-1jfs-masters-1
jfs-masters-1
 
Java Algorithm Interview Questions & Answers .pdf
Java Algorithm Interview Questions & Answers .pdfJava Algorithm Interview Questions & Answers .pdf
Java Algorithm Interview Questions & Answers .pdf
 
Data structures arrays
Data structures   arraysData structures   arrays
Data structures arrays
 
Minmax and alpha beta pruning.pptx
Minmax and alpha beta pruning.pptxMinmax and alpha beta pruning.pptx
Minmax and alpha beta pruning.pptx
 
Unit 2 Modeling of Programs A function maps inputs to out.docx
Unit 2 Modeling of Programs A function maps inputs to out.docxUnit 2 Modeling of Programs A function maps inputs to out.docx
Unit 2 Modeling of Programs A function maps inputs to out.docx
 
Tower of Hanoi.ppt
Tower of Hanoi.pptTower of Hanoi.ppt
Tower of Hanoi.ppt
 
Alpha beta
Alpha betaAlpha beta
Alpha beta
 
Searching Algorithm
Searching AlgorithmSearching Algorithm
Searching Algorithm
 
Advanced data structures using c++ 3
Advanced data structures using c++ 3Advanced data structures using c++ 3
Advanced data structures using c++ 3
 
Heap, quick and merge sort
Heap, quick and merge sortHeap, quick and merge sort
Heap, quick and merge sort
 
Sorting Seminar Presentation by Ashin Guha Majumder
Sorting Seminar Presentation by Ashin Guha MajumderSorting Seminar Presentation by Ashin Guha Majumder
Sorting Seminar Presentation by Ashin Guha Majumder
 
DA_02_algorithms.pptx
DA_02_algorithms.pptxDA_02_algorithms.pptx
DA_02_algorithms.pptx
 
Bidirectional graph search techniques for finding shortest path in image base...
Bidirectional graph search techniques for finding shortest path in image base...Bidirectional graph search techniques for finding shortest path in image base...
Bidirectional graph search techniques for finding shortest path in image base...
 
Searching techniques
Searching techniquesSearching techniques
Searching techniques
 
Control System Homework Help
Control System Homework HelpControl System Homework Help
Control System Homework Help
 
Ann a Algorithms notes
Ann a Algorithms notesAnn a Algorithms notes
Ann a Algorithms notes
 
Data Structures in C
Data Structures in CData Structures in C
Data Structures in C
 
A* Algorithm
A* AlgorithmA* Algorithm
A* Algorithm
 

More from Md. Mahedi Mahfuj

More from Md. Mahedi Mahfuj (19)

Parallel computing(1)
Parallel computing(1)Parallel computing(1)
Parallel computing(1)
 
Message passing interface
Message passing interfaceMessage passing interface
Message passing interface
 
Advanced computer architecture
Advanced computer architectureAdvanced computer architecture
Advanced computer architecture
 
Matrix multiplication graph
Matrix multiplication graphMatrix multiplication graph
Matrix multiplication graph
 
Strategy pattern
Strategy patternStrategy pattern
Strategy pattern
 
Database management system chapter16
Database management system chapter16Database management system chapter16
Database management system chapter16
 
Database management system chapter15
Database management system chapter15Database management system chapter15
Database management system chapter15
 
Database management system chapter12
Database management system chapter12Database management system chapter12
Database management system chapter12
 
Strategies in job search process
Strategies in job search processStrategies in job search process
Strategies in job search process
 
Report writing(short)
Report writing(short)Report writing(short)
Report writing(short)
 
Report writing(long)
Report writing(long)Report writing(long)
Report writing(long)
 
Job search_resume
Job search_resumeJob search_resume
Job search_resume
 
Job search_interview
Job search_interviewJob search_interview
Job search_interview
 
Basic and logical implementation of r language
Basic and logical implementation of r language Basic and logical implementation of r language
Basic and logical implementation of r language
 
R language
R languageR language
R language
 
Chatbot Artificial Intelligence
Chatbot Artificial IntelligenceChatbot Artificial Intelligence
Chatbot Artificial Intelligence
 
Cloud testing v1
Cloud testing v1Cloud testing v1
Cloud testing v1
 
Distributed deadlock
Distributed deadlockDistributed deadlock
Distributed deadlock
 
Paper review
Paper review Paper review
Paper review
 

Recently uploaded

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 

Recently uploaded (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

Parallel searching

  • 1. Class Assignment CLASS ASSIGNMENT-01 Parallel Searching Algorithms INTRODUCTION: Parallel Search, also known as Multithreaded Search or SMP Search, is a way to increase search speed by using additional processors. This topic that has been gaining popularity recently with multiprocessor computers becoming widely available. Actually, a parallel algorithm is an algorithm which can be executed a piece at a time on many different processing devices, and then put back together again at the end to get the correct result. The cost or complexity of serial algorithms is estimated in terms of the space (memory) and time (processor cycles) that they take. Parallel algorithms need to optimize one more resource, the communication between different processors. There are two ways parallel processors communicating, shared memory or message passing. This document gives a brief summary of four types SMP algorithms which are classified by their scalability (trend in search speed as the number of processors becomes large) and their speedup (change in time to complete a search). Typically, programmers use scaling to mean change in nodes per second (NPS) rates, and speedup to mean change in time to depth. The algorithms are described below in brief: Page 1 of 6
  • 2. Class Assignment ALPHA – BETA SEARCH: The Alpha-Beta algorithm (Alpha-Beta Pruning, Alpha-Beta Heuristic) is a significant enhancement to the minimax search algorithm that eliminates the need to search large portions of the game tree applying a branch-and-bound technique. Remarkably, it does this without any potential of overlooking a better move. If one already has found a quite good move and search for alternatives, one refutation is enough to avoid it. No need to look for even stronger refutations. Actually, the algorithm maintains two values, alpha and beta. They represent the minimum score that the maximizing player is assured of and the maximum score that the minimizing player is assured of respectively. IMPLEMENTATION: int alphaBetaMax( int alpha, int beta, int depthleft ) { if ( depthleft == 0 ) return evaluate(); for ( all moves) { score = alphaBetaMin( alpha, beta, depthleft - 1 ); if( score >= beta ) return beta; // fail hard beta-cutoff if( score > alpha ) alpha = score; // alpha acts like max in MiniMax } return alpha; } int alphaBetaMin( int alpha, int beta, int depthleft ) { if ( depthleft == 0 ) return -evaluate(); for ( all moves) { score = alphaBetaMax( alpha, beta, depthleft - 1 ); if( score <= alpha ) return alpha; // fail hard alpha-cutoff if( score < beta ) Page 2 of 6
  • 3. Class Assignment beta = score; // beta acts like min in MiniMax } return beta; } JAMBOREE SEARCH: Jamboree Search was introduced by Bradley Kuszmaul in his 1994 thesis, Synchronized MIMD Computing. This algorithm is actually a parallelized version of the Scout search algorithm. The idea is that all of the testing of any child that is not the first one is done in parallel and any test that fail are sequentially valued. Jamboree was used in the massive parallel chess programs StarTech and Socrates. It sequentialize full-window searches for values, because, while their authors are willing to take a chance that an empty window search will be squandered work, they are not willing to take the chance that a full-window search (which does not prune very much) will be squandered work. IMPLEMENTATION: int jamboree(CNode n, int α, int β) { if (n is leaf) return static_eval(n); c[ ] = the childen of n; b = -jamboree(c[0], -β, -α); if (b >= β) return b; if (b > α) α = b; In Parallel: for (i=1; i < |c[ ]|; i++) { s = -jamboree(c[i], -α - 1, -α); if (s > b) b = s; if (s >= β) abort_and_return s; if (s > α) { s = -jamboree(c[i], -β, -α); if (s >= β) abort_and_return s; if (s > α) α = s; Page 3 of 6
  • 4. Class Assignment if (s > b) b = s; } } return b; } DEPTH – FIRST SEARCH: We start the graph traversal at an arbitrary vertex and go down a particular branch until we reach a dead end. Then we back up and go as deep possible. In this way we visit all vertices and edges as well. The search is similar to searching maze of hallways, edges, and rooms, vertices, with a string and paint. We fix the string in the starting we room and mark the room with the paint as visited we then go down the an incident hallway into the next room. We mark that room and go to the next room always marking the rooms as visited with the paint. When we get to a dead end or a room we have already visited we follow the string back a room that has a hall way we have not gone through yet. This graph traversal is very similar to a tree traversal; either post order or preorder, in fact if the graph is a tree then the traversal is same. The algorithm is naturally recursive, just as the tree traversal. The algorithm is forecast here: IMPLEMENTATION: Algorithm DFS (graph G, Vertex v) // Recursive algorithm for all edges e in G.incidentEdges(v) do if edge e is unexplored then w = G.opposite(v, e) if vertex w is unexplored then label e as discovery edge Page 4 of 6
  • 5. Class Assignment recursively call DFS(G, w) else label e back edge. PVS SEARCH: The best-known early attempt at searching such trees in parallel was the Principal Variation Splitting (PVS) algorithm. This was both simple to understand and easy to implement. When starting an N-ply search, one processor generates the moves at the root position, makes the first move (leading to what is often referred to as the left-most descendent position), then generates the moves at ply=2, makes the first move again, and continues this until reaching ply=N. At this point, the processor pool searches all of the moves at this ply (N) in parallel, and the best value is backed up to ply N-1. Now that the lower bound for ply N-1 is known, the rest of the moves at N-1 are searched in parallel, and the best value again backed up to N-2. This continues until the first root move has been searched and the value is known. The remainder of the root moves is searched in parallel, until none are left. The next iteration is started and the process repeats for depth N+1. Performance analysis with this algorithm (PVS) produced speedups given below in table 1. +-------------+-----+-----+-----+-----+-----+ |# processors | 1 | 2 | 4 | 8 | 16 | +-------------+-----+-----+-----+-----+-----+ |speedup | 1.0 | 1.8 | 3.0 | 4.1 | 4.6 | +-------------+-----+-----+-----+-----+-----+ Table 1 PVS performance results Page 5 of 6
  • 6. Class Assignment DRAWBACKS: Firstly, All of the processors work together at a single node, searching descendent positions in parallel. If the number of possible moves is small, or the number of processors is large, some have nothing to do. Second, every branch from a given position does not produce a tree of equal size, since some branches may grow into complicated positions with lots of checks and search extensions that make the tree very large, while other branches grow into simple positions that are searched quickly. This leads to a load balancing problem where one processor begins searching a very large tree and the others finish the easy moves and have to wait for the remaining processor to slowly traverse the tree. Secondly, With a reasonable number of processors, the speedup can look very bad if most of the time many of the processors are waiting on one last node to be completed before they can back up to ply N-1 and start to work there. REFERENCE: [1] http://chessprogramming.wikispaces.com/Parallel+Search [2] http://chessprogramming.wikispaces.com/Jamboree [3] http://chessprogramming.wikispaces.com/Alpha-Beta [4] http://www.netlib.org/utk/lsi/pcwLSI/text/node350.html [5] http://www-turbul.ifh.uni-karlsruhe.de/uhlmann/mpi3/report_6.html [6] http://www.cis.uab.edu/hyatt/search.html ……………………………………………………..X………………………………………………………. Page 6 of 6