SlideShare uma empresa Scribd logo
1 de 32
Randomized Algorithms
CS648
Lecture 10
Random Sampling
part-II
(To find a subset with desired property)
1
Overview
• There is a huge list (1 million) of blood donors.
• Unfortunately the blood group information is missing at present.
• We need a donor with blood group O+.
• What to do ?
Solution: (Select a random subset of donors.)
Repeat until we get a donor of blood group O+.
{ Pick phone number of a donor randomly uniformly
Call him to ask his Blood group.
}
Random Sampling
• Suppose there is a computational problem where we require to find a
subset with some desired properties.
• Unfortunately, computing such a set deterministically may take huge time.
• Random sampling carried out suitably may produce a subset with the
desired property with some probability.
RANDOMIZED ALGORITHM FOR
BPWM PROBLEM
Integer Product of Matrices
1 0 0 1 0
1 0 0 0 1
0 0 1 0 0
0 1 0 1 0
1 1 0 1 0
1 0 1 0 0
0 1 1 0 1
1 1 1 1 0
1 1 1 0 0
1 0 0 1 0
2 1 2 0 0
2 0 1 0 0
1 1 1 1 0
1 2 2 0 1
2 2 3 0 1
A B D
Boolean Product of Matrices
1 0 0 1 0
1 0 0 0 1
0 0 1 0 0
0 1 0 1 0
1 1 0 1 0
1 0 1 0 0
0 1 1 0 1
1 1 1 1 0
1 1 1 0 0
1 0 0 1 0
1 1 1 0 0
1 0 1 0 0
1 1 1 1 0
1 1 1 0 1
1 1 1 0 1
A B C
Boolean Product of Matrices
1 0 0 1 0
1 0 0 0 1
0 0 1 0 0
0 1 0 1 0
1 1 0 1 0
1 0 1 0 0
0 1 1 0 1
1 1 1 1 0
1 1 1 0 0
1 0 0 1 0
1 1 1 0 0
1 0 1 0 0
1 1 1 1 0
1 1 1 0 1
1 1 1 0 1
A B C
Boolean Product Witness Matrix (BPWM)
MOTIVATION FOR BPWM
All Pairs Shortest Paths (APSP)
All Pairs Shortest Paths (APSP)
Students having interest in algorithms are
strongly advised to study this novel
algorithm from Motwani-Raghwan book
or the original journal version. (This is, of
course, not part of the syllabus for CS648)
RANDOMIZED ALGORITHM FOR
BPWM
Boolean Product Witness Matrix (BPWM)
Boolean Product of Matrices
1 0 0 1 0
1 0 0 0 1
0 0 1 0 0
0 1 0 1 0
1 1 0 1 0
1 0 1 0 0
0 1 1 0 1
1 1 1 1 0
1 1 1 0 0
1 0 0 1 0
1 1 1 0 0
1 0 1 0 0
1 1 1 1 0
1 1 1 0 1
1 1 1 0 1
A B C
2 1 2 0 0
2 0 1 0 0
1 1 1 1 0
1 2 2 0 1
2 2 3 0 1
D
Look carefully at the integer
product matrix D. Does it
have any thing to do with
witnesses.
Boolean Product of Matrices
1 0 0 1 0
1 0 0 0 1
0 0 1 0 0
0 1 0 1 0
1 1 0 1 0
1 0 1 0 0
0 1 1 0 1
1 1 1 1 0
1 1 1 0 0
1 0 0 1 0
2 1 2 0 0
2 0 1 0 0
1 1 1 1 0
1 2 2 0 1
2 2 3 0 1
A B D
Boolean Product of Matrices
1 0 0 1 0
1 0 0 0 1
0 0 1 0 0
0 1 0 1 0
1 1 0 1 0
1 0 1 0 0
0 1 1 0 1
1 1 1 1 0
1 1 1 0 0
1 0 0 1 0
2 1 2 0 0
2 0 1 0 0
1 1 1 1 0
1 2 2 0 1
2 2 3 0 1
A B D
1 2 3 4 5
⨯ ⨯ ⨯ ⨯ ⨯
There is a way to manipulate A so
that D will store a witness for all
those pairs which have singleton
witness. Can you guess ?
Boolean Product of Matrices
1 0 0 1 0
1 0 0 0 1
0 0 1 0 0
0 1 0 1 0
1 1 0 1 0
1 0 1 0 0
0 1 1 0 1
1 1 1 1 0
1 1 1 0 0
1 0 0 1 0
2 4 2 0 0
2 0 1 0 0
3 3 3 3 0
2 2 2 0 2
2 2 3 0 2
A B D
1 2 3 4 5
⨯ ⨯ ⨯ ⨯ ⨯
Boolean Product of Matrices
1 0 0 1 0
1 0 0 0 1
0 0 1 0 0
0 1 0 1 0
1 1 0 1 0
1 0 1 0 0
0 1 1 0 1
1 1 1 1 0
1 1 1 0 0
1 0 0 1 0
5 4 5 0 0
6 0 1 0 0
3 3 3 3 0
2 6 6 0 2
5 6 7 0 2
A B D
1 2 3 4 5
⨯ ⨯ ⨯ ⨯ ⨯
Algorithm for Computing Singleton Witnesses
Algorithm Design for BPWM
1 0 1 1 1 0 0 1 0 1
1
1
0
1
1
0
1
1
0
0
1 2 3 4 … n
⨯ ⨯ ⨯ ⨯ ⨯⨯ ⨯ ⨯ ⨯ ⨯
A B
1 0 1 1 1 0 0 1 0 1
1
1
0
1
1
0
1
1
0
0
1 2 3 4 … n
⨯ ⨯ ⨯ ⨯ ⨯⨯ ⨯ ⨯ ⨯ ⨯
A B
1 0 1 1 1 0 0 1 0 1
1
1
0
1
1
0
1
1
0
0
1 2 3 4 5 … n-1 n
⨯ ⨯ ⨯ ⨯ ⨯⨯ ⨯ ⨯ ⨯ ⨯
A B
1 0 1 1 1 0 0 1 0 1
1
1
0
1
1
0
1
1
0
0
0 2 3 0 5 … n-1 0
⨯ ⨯ ⨯ ⨯ ⨯⨯ ⨯ ⨯ ⨯ ⨯
A B
No idea!
Let us ask the following related but easier
question.
Conclusion
A sketch of the solution for Question 1 was given in the class. The
students are encouraged to work out the exact details. The solution
will be presented in the beginning of next lecture class.

Mais conteúdo relacionado

Semelhante a Lecture 10-cs648=2013 Randomized Algorithms

Digital electronics logic design complete notes.pdf
Digital electronics logic design complete notes.pdfDigital electronics logic design complete notes.pdf
Digital electronics logic design complete notes.pdf022BELEHemant
 
Exploiting Worker Correlation for Label Aggregation in Crowdsourcing
Exploiting Worker Correlation for Label Aggregation in CrowdsourcingExploiting Worker Correlation for Label Aggregation in Crowdsourcing
Exploiting Worker Correlation for Label Aggregation in CrowdsourcingYuanLi589586
 
Lecture 2 - Bit vs Qubits.pptx
Lecture 2 - Bit vs Qubits.pptxLecture 2 - Bit vs Qubits.pptx
Lecture 2 - Bit vs Qubits.pptxNatKell
 
2015 bioinformatics score_matrices_wim_vancriekinge
2015 bioinformatics score_matrices_wim_vancriekinge2015 bioinformatics score_matrices_wim_vancriekinge
2015 bioinformatics score_matrices_wim_vancriekingeProf. Wim Van Criekinge
 
Artificial Neural Networks_Bioinsspired_Algorithms_Nov 20.ppt
Artificial Neural Networks_Bioinsspired_Algorithms_Nov 20.pptArtificial Neural Networks_Bioinsspired_Algorithms_Nov 20.ppt
Artificial Neural Networks_Bioinsspired_Algorithms_Nov 20.pptAnonymous9etQKwW
 
2016 bioinformatics i_score_matrices_wim_vancriekinge
2016 bioinformatics i_score_matrices_wim_vancriekinge2016 bioinformatics i_score_matrices_wim_vancriekinge
2016 bioinformatics i_score_matrices_wim_vancriekingeProf. Wim Van Criekinge
 
SPIE Conference V3.0
SPIE Conference V3.0SPIE Conference V3.0
SPIE Conference V3.0Robert Fry
 
Bioinformatica t3-scoring matrices-wim_vancriekinge_v2013
Bioinformatica t3-scoring matrices-wim_vancriekinge_v2013Bioinformatica t3-scoring matrices-wim_vancriekinge_v2013
Bioinformatica t3-scoring matrices-wim_vancriekinge_v2013Prof. Wim Van Criekinge
 
Neural Collaborative Filtering Explanation & Implementation
Neural Collaborative Filtering Explanation & ImplementationNeural Collaborative Filtering Explanation & Implementation
Neural Collaborative Filtering Explanation & ImplementationKung-hsiang (Steeve) Huang
 
Two Pseudo-random Number Generators, an Overview
Two Pseudo-random Number Generators, an Overview Two Pseudo-random Number Generators, an Overview
Two Pseudo-random Number Generators, an Overview Kato Mivule
 
Quantum Computing: The Why and How
Quantum Computing: The Why and HowQuantum Computing: The Why and How
Quantum Computing: The Why and Howinside-BigData.com
 
E..Zikariene. Priziurima aplinkos duomenu klasifikacija, pagrista erdviniais ...
E..Zikariene. Priziurima aplinkos duomenu klasifikacija, pagrista erdviniais ...E..Zikariene. Priziurima aplinkos duomenu klasifikacija, pagrista erdviniais ...
E..Zikariene. Priziurima aplinkos duomenu klasifikacija, pagrista erdviniais ...Lietuvos kompiuterininkų sąjunga
 
Deep learning in E-Commerce Applications and Challenges (CNN)
Deep learning in E-Commerce Applications and Challenges (CNN) Deep learning in E-Commerce Applications and Challenges (CNN)
Deep learning in E-Commerce Applications and Challenges (CNN) Houda Bakir
 
Automatic Tuning of the OP-1 Synthesizer Using a Multi-objective Genetic Algo...
Automatic Tuning of the OP-1 Synthesizer Using a Multi-objective Genetic Algo...Automatic Tuning of the OP-1 Synthesizer Using a Multi-objective Genetic Algo...
Automatic Tuning of the OP-1 Synthesizer Using a Multi-objective Genetic Algo...Matthieu Macret
 
Binary images and Morphology - Computer Vision
Binary images and Morphology - Computer VisionBinary images and Morphology - Computer Vision
Binary images and Morphology - Computer Visionothersk46
 
OpenCL applications in genomics
OpenCL applications in genomicsOpenCL applications in genomics
OpenCL applications in genomicsUSC
 
Christian Hennig- Assessing the quality of a clustering
Christian Hennig- Assessing the quality of a clusteringChristian Hennig- Assessing the quality of a clustering
Christian Hennig- Assessing the quality of a clusteringPyData
 

Semelhante a Lecture 10-cs648=2013 Randomized Algorithms (20)

Digital electronics logic design complete notes.pdf
Digital electronics logic design complete notes.pdfDigital electronics logic design complete notes.pdf
Digital electronics logic design complete notes.pdf
 
Exploiting Worker Correlation for Label Aggregation in Crowdsourcing
Exploiting Worker Correlation for Label Aggregation in CrowdsourcingExploiting Worker Correlation for Label Aggregation in Crowdsourcing
Exploiting Worker Correlation for Label Aggregation in Crowdsourcing
 
Lecture 2 - Bit vs Qubits.pptx
Lecture 2 - Bit vs Qubits.pptxLecture 2 - Bit vs Qubits.pptx
Lecture 2 - Bit vs Qubits.pptx
 
2015 bioinformatics score_matrices_wim_vancriekinge
2015 bioinformatics score_matrices_wim_vancriekinge2015 bioinformatics score_matrices_wim_vancriekinge
2015 bioinformatics score_matrices_wim_vancriekinge
 
Artificial Neural Networks_Bioinsspired_Algorithms_Nov 20.ppt
Artificial Neural Networks_Bioinsspired_Algorithms_Nov 20.pptArtificial Neural Networks_Bioinsspired_Algorithms_Nov 20.ppt
Artificial Neural Networks_Bioinsspired_Algorithms_Nov 20.ppt
 
2016 bioinformatics i_score_matrices_wim_vancriekinge
2016 bioinformatics i_score_matrices_wim_vancriekinge2016 bioinformatics i_score_matrices_wim_vancriekinge
2016 bioinformatics i_score_matrices_wim_vancriekinge
 
SPIE Conference V3.0
SPIE Conference V3.0SPIE Conference V3.0
SPIE Conference V3.0
 
Bioinformatica t3-scoring matrices-wim_vancriekinge_v2013
Bioinformatica t3-scoring matrices-wim_vancriekinge_v2013Bioinformatica t3-scoring matrices-wim_vancriekinge_v2013
Bioinformatica t3-scoring matrices-wim_vancriekinge_v2013
 
Neural Collaborative Filtering Explanation & Implementation
Neural Collaborative Filtering Explanation & ImplementationNeural Collaborative Filtering Explanation & Implementation
Neural Collaborative Filtering Explanation & Implementation
 
Two Pseudo-random Number Generators, an Overview
Two Pseudo-random Number Generators, an Overview Two Pseudo-random Number Generators, an Overview
Two Pseudo-random Number Generators, an Overview
 
Quantum Computing: The Why and How
Quantum Computing: The Why and HowQuantum Computing: The Why and How
Quantum Computing: The Why and How
 
E..Zikariene. Priziurima aplinkos duomenu klasifikacija, pagrista erdviniais ...
E..Zikariene. Priziurima aplinkos duomenu klasifikacija, pagrista erdviniais ...E..Zikariene. Priziurima aplinkos duomenu klasifikacija, pagrista erdviniais ...
E..Zikariene. Priziurima aplinkos duomenu klasifikacija, pagrista erdviniais ...
 
Deep learning in E-Commerce Applications and Challenges (CNN)
Deep learning in E-Commerce Applications and Challenges (CNN) Deep learning in E-Commerce Applications and Challenges (CNN)
Deep learning in E-Commerce Applications and Challenges (CNN)
 
Automatic Tuning of the OP-1 Synthesizer Using a Multi-objective Genetic Algo...
Automatic Tuning of the OP-1 Synthesizer Using a Multi-objective Genetic Algo...Automatic Tuning of the OP-1 Synthesizer Using a Multi-objective Genetic Algo...
Automatic Tuning of the OP-1 Synthesizer Using a Multi-objective Genetic Algo...
 
Binary images and Morphology - Computer Vision
Binary images and Morphology - Computer VisionBinary images and Morphology - Computer Vision
Binary images and Morphology - Computer Vision
 
02-gates-w.pptx
02-gates-w.pptx02-gates-w.pptx
02-gates-w.pptx
 
Ch06 alignment
Ch06 alignmentCh06 alignment
Ch06 alignment
 
OpenCL applications in genomics
OpenCL applications in genomicsOpenCL applications in genomics
OpenCL applications in genomics
 
Christian Hennig- Assessing the quality of a clustering
Christian Hennig- Assessing the quality of a clusteringChristian Hennig- Assessing the quality of a clustering
Christian Hennig- Assessing the quality of a clustering
 
Project lfsr
Project lfsrProject lfsr
Project lfsr
 

Mais de Anshul Yadav

Lecture 14-cs648-2013
Lecture 14-cs648-2013Lecture 14-cs648-2013
Lecture 14-cs648-2013Anshul Yadav
 
Theoretical assign-2-hints
Theoretical assign-2-hintsTheoretical assign-2-hints
Theoretical assign-2-hintsAnshul Yadav
 
Lecture 12-cs648-2013 Randomized Algorithms
Lecture 12-cs648-2013 Randomized AlgorithmsLecture 12-cs648-2013 Randomized Algorithms
Lecture 12-cs648-2013 Randomized AlgorithmsAnshul Yadav
 
Lecture 11-cs648-2013 Randomized Algorithms
Lecture 11-cs648-2013 Randomized AlgorithmsLecture 11-cs648-2013 Randomized Algorithms
Lecture 11-cs648-2013 Randomized AlgorithmsAnshul Yadav
 
Lecture 9-cs648-2013 Randomized Algorithms
Lecture 9-cs648-2013 Randomized AlgorithmsLecture 9-cs648-2013 Randomized Algorithms
Lecture 9-cs648-2013 Randomized AlgorithmsAnshul Yadav
 
Lecture 6-cs648 Randomized Algorithms
Lecture 6-cs648 Randomized AlgorithmsLecture 6-cs648 Randomized Algorithms
Lecture 6-cs648 Randomized AlgorithmsAnshul Yadav
 
Lecture 5-cs648 Randomized Algorithms
Lecture 5-cs648 Randomized AlgorithmsLecture 5-cs648 Randomized Algorithms
Lecture 5-cs648 Randomized AlgorithmsAnshul Yadav
 
Lecture 4-cs648 Randomized Algorithms
Lecture 4-cs648 Randomized AlgorithmsLecture 4-cs648 Randomized Algorithms
Lecture 4-cs648 Randomized AlgorithmsAnshul Yadav
 
Lecture 3-cs648 Randomized Algorithms
Lecture 3-cs648 Randomized AlgorithmsLecture 3-cs648 Randomized Algorithms
Lecture 3-cs648 Randomized AlgorithmsAnshul Yadav
 
Lecture 2-cs648 Randomized Algorithms
Lecture 2-cs648 Randomized AlgorithmsLecture 2-cs648 Randomized Algorithms
Lecture 2-cs648 Randomized AlgorithmsAnshul Yadav
 
Lecture 7-cs648 Randomized Algorithms
Lecture 7-cs648 Randomized AlgorithmsLecture 7-cs648 Randomized Algorithms
Lecture 7-cs648 Randomized AlgorithmsAnshul Yadav
 

Mais de Anshul Yadav (17)

Lecture 19-cs648
Lecture 19-cs648Lecture 19-cs648
Lecture 19-cs648
 
Lecture 17-cs648
Lecture 17-cs648Lecture 17-cs648
Lecture 17-cs648
 
Lecture 14-cs648-2013
Lecture 14-cs648-2013Lecture 14-cs648-2013
Lecture 14-cs648-2013
 
Lecture 13-cs648
Lecture 13-cs648Lecture 13-cs648
Lecture 13-cs648
 
Lecture 18-cs648
Lecture 18-cs648Lecture 18-cs648
Lecture 18-cs648
 
Lecture 16
Lecture 16Lecture 16
Lecture 16
 
Theoretical assign-2-hints
Theoretical assign-2-hintsTheoretical assign-2-hints
Theoretical assign-2-hints
 
Lecture 12-cs648-2013 Randomized Algorithms
Lecture 12-cs648-2013 Randomized AlgorithmsLecture 12-cs648-2013 Randomized Algorithms
Lecture 12-cs648-2013 Randomized Algorithms
 
Lecture 11-cs648-2013 Randomized Algorithms
Lecture 11-cs648-2013 Randomized AlgorithmsLecture 11-cs648-2013 Randomized Algorithms
Lecture 11-cs648-2013 Randomized Algorithms
 
Lecture 9-cs648-2013 Randomized Algorithms
Lecture 9-cs648-2013 Randomized AlgorithmsLecture 9-cs648-2013 Randomized Algorithms
Lecture 9-cs648-2013 Randomized Algorithms
 
Lecture 6-cs648 Randomized Algorithms
Lecture 6-cs648 Randomized AlgorithmsLecture 6-cs648 Randomized Algorithms
Lecture 6-cs648 Randomized Algorithms
 
Lecture 5-cs648 Randomized Algorithms
Lecture 5-cs648 Randomized AlgorithmsLecture 5-cs648 Randomized Algorithms
Lecture 5-cs648 Randomized Algorithms
 
Lecture 4-cs648 Randomized Algorithms
Lecture 4-cs648 Randomized AlgorithmsLecture 4-cs648 Randomized Algorithms
Lecture 4-cs648 Randomized Algorithms
 
Lecture 3-cs648 Randomized Algorithms
Lecture 3-cs648 Randomized AlgorithmsLecture 3-cs648 Randomized Algorithms
Lecture 3-cs648 Randomized Algorithms
 
Lecture 2-cs648 Randomized Algorithms
Lecture 2-cs648 Randomized AlgorithmsLecture 2-cs648 Randomized Algorithms
Lecture 2-cs648 Randomized Algorithms
 
Lecture 7-cs648 Randomized Algorithms
Lecture 7-cs648 Randomized AlgorithmsLecture 7-cs648 Randomized Algorithms
Lecture 7-cs648 Randomized Algorithms
 
Lecture 1-cs648
Lecture 1-cs648Lecture 1-cs648
Lecture 1-cs648
 

Último

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
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
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
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
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Último (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
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...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
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
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

Lecture 10-cs648=2013 Randomized Algorithms

  • 1. Randomized Algorithms CS648 Lecture 10 Random Sampling part-II (To find a subset with desired property) 1
  • 2. Overview • There is a huge list (1 million) of blood donors. • Unfortunately the blood group information is missing at present. • We need a donor with blood group O+. • What to do ? Solution: (Select a random subset of donors.) Repeat until we get a donor of blood group O+. { Pick phone number of a donor randomly uniformly Call him to ask his Blood group. }
  • 3. Random Sampling • Suppose there is a computational problem where we require to find a subset with some desired properties. • Unfortunately, computing such a set deterministically may take huge time. • Random sampling carried out suitably may produce a subset with the desired property with some probability.
  • 5. Integer Product of Matrices 1 0 0 1 0 1 0 0 0 1 0 0 1 0 0 0 1 0 1 0 1 1 0 1 0 1 0 1 0 0 0 1 1 0 1 1 1 1 1 0 1 1 1 0 0 1 0 0 1 0 2 1 2 0 0 2 0 1 0 0 1 1 1 1 0 1 2 2 0 1 2 2 3 0 1 A B D
  • 6. Boolean Product of Matrices 1 0 0 1 0 1 0 0 0 1 0 0 1 0 0 0 1 0 1 0 1 1 0 1 0 1 0 1 0 0 0 1 1 0 1 1 1 1 1 0 1 1 1 0 0 1 0 0 1 0 1 1 1 0 0 1 0 1 0 0 1 1 1 1 0 1 1 1 0 1 1 1 1 0 1 A B C
  • 7. Boolean Product of Matrices 1 0 0 1 0 1 0 0 0 1 0 0 1 0 0 0 1 0 1 0 1 1 0 1 0 1 0 1 0 0 0 1 1 0 1 1 1 1 1 0 1 1 1 0 0 1 0 0 1 0 1 1 1 0 0 1 0 1 0 0 1 1 1 1 0 1 1 1 0 1 1 1 1 0 1 A B C
  • 8. Boolean Product Witness Matrix (BPWM)
  • 10. All Pairs Shortest Paths (APSP)
  • 11. All Pairs Shortest Paths (APSP) Students having interest in algorithms are strongly advised to study this novel algorithm from Motwani-Raghwan book or the original journal version. (This is, of course, not part of the syllabus for CS648)
  • 13. Boolean Product Witness Matrix (BPWM)
  • 14. Boolean Product of Matrices 1 0 0 1 0 1 0 0 0 1 0 0 1 0 0 0 1 0 1 0 1 1 0 1 0 1 0 1 0 0 0 1 1 0 1 1 1 1 1 0 1 1 1 0 0 1 0 0 1 0 1 1 1 0 0 1 0 1 0 0 1 1 1 1 0 1 1 1 0 1 1 1 1 0 1 A B C 2 1 2 0 0 2 0 1 0 0 1 1 1 1 0 1 2 2 0 1 2 2 3 0 1 D Look carefully at the integer product matrix D. Does it have any thing to do with witnesses.
  • 15. Boolean Product of Matrices 1 0 0 1 0 1 0 0 0 1 0 0 1 0 0 0 1 0 1 0 1 1 0 1 0 1 0 1 0 0 0 1 1 0 1 1 1 1 1 0 1 1 1 0 0 1 0 0 1 0 2 1 2 0 0 2 0 1 0 0 1 1 1 1 0 1 2 2 0 1 2 2 3 0 1 A B D
  • 16. Boolean Product of Matrices 1 0 0 1 0 1 0 0 0 1 0 0 1 0 0 0 1 0 1 0 1 1 0 1 0 1 0 1 0 0 0 1 1 0 1 1 1 1 1 0 1 1 1 0 0 1 0 0 1 0 2 1 2 0 0 2 0 1 0 0 1 1 1 1 0 1 2 2 0 1 2 2 3 0 1 A B D 1 2 3 4 5 ⨯ ⨯ ⨯ ⨯ ⨯ There is a way to manipulate A so that D will store a witness for all those pairs which have singleton witness. Can you guess ?
  • 17. Boolean Product of Matrices 1 0 0 1 0 1 0 0 0 1 0 0 1 0 0 0 1 0 1 0 1 1 0 1 0 1 0 1 0 0 0 1 1 0 1 1 1 1 1 0 1 1 1 0 0 1 0 0 1 0 2 4 2 0 0 2 0 1 0 0 3 3 3 3 0 2 2 2 0 2 2 2 3 0 2 A B D 1 2 3 4 5 ⨯ ⨯ ⨯ ⨯ ⨯
  • 18. Boolean Product of Matrices 1 0 0 1 0 1 0 0 0 1 0 0 1 0 0 0 1 0 1 0 1 1 0 1 0 1 0 1 0 0 0 1 1 0 1 1 1 1 1 0 1 1 1 0 0 1 0 0 1 0 5 4 5 0 0 6 0 1 0 0 3 3 3 3 0 2 6 6 0 2 5 6 7 0 2 A B D 1 2 3 4 5 ⨯ ⨯ ⨯ ⨯ ⨯
  • 19. Algorithm for Computing Singleton Witnesses
  • 21.
  • 22. 1 0 1 1 1 0 0 1 0 1 1 1 0 1 1 0 1 1 0 0 1 2 3 4 … n ⨯ ⨯ ⨯ ⨯ ⨯⨯ ⨯ ⨯ ⨯ ⨯ A B
  • 23. 1 0 1 1 1 0 0 1 0 1 1 1 0 1 1 0 1 1 0 0 1 2 3 4 … n ⨯ ⨯ ⨯ ⨯ ⨯⨯ ⨯ ⨯ ⨯ ⨯ A B
  • 24. 1 0 1 1 1 0 0 1 0 1 1 1 0 1 1 0 1 1 0 0 1 2 3 4 5 … n-1 n ⨯ ⨯ ⨯ ⨯ ⨯⨯ ⨯ ⨯ ⨯ ⨯ A B
  • 25. 1 0 1 1 1 0 0 1 0 1 1 1 0 1 1 0 1 1 0 0 0 2 3 0 5 … n-1 0 ⨯ ⨯ ⨯ ⨯ ⨯⨯ ⨯ ⨯ ⨯ ⨯ A B
  • 26. No idea! Let us ask the following related but easier question.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32. Conclusion A sketch of the solution for Question 1 was given in the class. The students are encouraged to work out the exact details. The solution will be presented in the beginning of next lecture class.