SlideShare a Scribd company logo
1 of 40
Download to read offline
A Presentation on Memory Effcient Algorithms
April 2019 CSE6408
Student ID:0419052090
Bangladesh University of Engineering and Technology
July 2, 2019
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 1 / 36
Low Memory Algorithm
Motivation
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 2 / 36
Low Memory Algorithm
Motivation
In-place Model
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 2 / 36
Low Memory Algorithm
Motivation
In-place Model
Read-Only Model
Time Interval Problem
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 2 / 36
Low Memory Algorithm
Motivation
In-place Model
Read-Only Model
Time Interval Problem
Snake/Snail Problem
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 2 / 36
Low Memory Algorithm
Motivation
In-place Model
Read-Only Model
Time Interval Problem
Snake/Snail Problem
Cycle Counting Problem
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 2 / 36
Objective:
Objective of memory efficient algorithm is to reduce working storeage
requirement in the expense of limited inefficiency in the running time.
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 3 / 36
In-place-Model:
Input data can be changed during the execution and after execution
each object is in the input array
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 4 / 36
Read-Only-Model:
Input data structure is read only memory that is input data structure
remains unchanged after execution.Here we solve all the problem
using Read-only-Model.
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 5 / 36
Time Interval Problem
Problem Definition:
Suppose you are working for a company. You are now looking at a
list of monthly profit and loss and wonder when the company was
best. To measure the company’s commercial activity, you can define
the total amount of profit for consecutive months.
month 1 2 3 4 5 6 7 8 9 10 11 12
profit 4 -3 5 -7 9 -2 5 -7 9 -2 -5 6
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 6 / 36
Algorithm 1
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 7 / 36
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 8 / 36
Algorithm 1
Time complexity O(n2)
Space complexity O(n2)
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 9 / 36
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 10 / 36
Algorithm 2
Time complexity O(n2)
Space complexity O(n)
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 11 / 36
Algorithm 3
month 1 2 3 4 5 6 7 8 9 10 11 12
profit 4 -3 5 -7 9 -2 5 -7 9 -2 -5 6
Sum 4 1 6 -1 8 6 11 4 13 11 6 12
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 12 / 36
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 13 / 36
Algorithm 3
Time complexity O(n)
Space complexity O(n)
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 14 / 36
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 15 / 36
Lemma
Given a list of profit and loss for n months in a read-only array,
Algorithm 4 finds the best time interval in O(n) time without using
an extra array.
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 16 / 36
Snake or Snail: Detection of a Cycle Problem
Problem Definition:
Suppose we have a linked list with single pointers. Given a pointer to
the head of such a linked-list, we want to determine whether it
contains a cycle or not.
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 17 / 36
Snake
When we traverse the list one after another,if NULL is found at any
point the it will be considered as ”Snake”.
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 18 / 36
Snail
If the exist a cycle in the list then it will be considered as ”Snail”.
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 19 / 36
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 20 / 36
Algorithm 1
Time complexity O(n2)
Space complexity O(n)
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 21 / 36
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 22 / 36
Algorithm 2
Time complexity O(n)
Space complexity O(n)
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 23 / 36
Algorithm 3:The Tortoise and Hare Algorithm
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 24 / 36
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 25 / 36
Algorithm 3
Time complexity O(n)
Space complexity O(1)
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 26 / 36
Lemma
Algorithm T and H correctly determine snake/snail distinction of a
given list containing n list elements in O(n) time using only O(1)
working space.
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 27 / 36
Cycle Counting Problem
Problem Definition:
Given a 2-regular graph G by a sequence of n pairs on integers
between 1 and n on a read-only array, give an efficient algorithm
which counts the number of cycles in G using only constant work
space.
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 28 / 36
2-Regular Graph:
A 2-Regular Graph is a regular graph where number of degree of each
vertex is 2 i.e,each vertex has 2 edge.
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 29 / 36
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 30 / 36
Algorithm 1
Time complexity O(n)
Space complexity O(n)
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 31 / 36
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 32 / 36
Algorithm 2
Time complexity O(n2)
Space complexity O(1)
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 33 / 36
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 34 / 36
Algorithm 3
Time complexity O(nlogn)
Space complexity O(1)
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 35 / 36
Thank You!
Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 36 / 36

More Related Content

What's hot

Computer Hardware-servicing-learning-module
Computer Hardware-servicing-learning-moduleComputer Hardware-servicing-learning-module
Computer Hardware-servicing-learning-moduleBogs De Castro
 
Xat 2014 how different from cat
Xat 2014  how different from catXat 2014  how different from cat
Xat 2014 how different from catsakshij91
 
Pc hardware servicing learning module (1)
Pc hardware servicing learning module (1)Pc hardware servicing learning module (1)
Pc hardware servicing learning module (1)Denzel Darilag
 
DepEd TLE Computer Hardware Servicing Curriculum Guide Grade 7-10
DepEd TLE Computer Hardware Servicing Curriculum Guide Grade 7-10DepEd TLE Computer Hardware Servicing Curriculum Guide Grade 7-10
DepEd TLE Computer Hardware Servicing Curriculum Guide Grade 7-10Bogs De Castro
 
NDA Coaching in Dehradun
NDA Coaching in DehradunNDA Coaching in Dehradun
NDA Coaching in Dehradunsunnythakur68
 
K to 12_entrep-based_pc_hardware_servicing_learning_module
K to 12_entrep-based_pc_hardware_servicing_learning_moduleK to 12_entrep-based_pc_hardware_servicing_learning_module
K to 12_entrep-based_pc_hardware_servicing_learning_moduleJohndion Ruloma
 
Ict week 1 computer definition, purpose & importance
Ict week 1 computer definition, purpose & importanceIct week 1 computer definition, purpose & importance
Ict week 1 computer definition, purpose & importanceAllan Tomas
 

What's hot (12)

Computer Hardware-servicing-learning-module
Computer Hardware-servicing-learning-moduleComputer Hardware-servicing-learning-module
Computer Hardware-servicing-learning-module
 
C chs tg-module1-4_dec
C chs tg-module1-4_decC chs tg-module1-4_dec
C chs tg-module1-4_dec
 
K to 12 pc hardware servicing learning module
K to 12 pc hardware servicing learning moduleK to 12 pc hardware servicing learning module
K to 12 pc hardware servicing learning module
 
TLE-IA Carpentry Curriculum Guide
TLE-IA Carpentry Curriculum GuideTLE-IA Carpentry Curriculum Guide
TLE-IA Carpentry Curriculum Guide
 
Xat 2014 how different from cat
Xat 2014  how different from catXat 2014  how different from cat
Xat 2014 how different from cat
 
Pc hardware servicing learning module (1)
Pc hardware servicing learning module (1)Pc hardware servicing learning module (1)
Pc hardware servicing learning module (1)
 
DepEd TLE Computer Hardware Servicing Curriculum Guide Grade 7-10
DepEd TLE Computer Hardware Servicing Curriculum Guide Grade 7-10DepEd TLE Computer Hardware Servicing Curriculum Guide Grade 7-10
DepEd TLE Computer Hardware Servicing Curriculum Guide Grade 7-10
 
NDA Coaching in Dehradun
NDA Coaching in DehradunNDA Coaching in Dehradun
NDA Coaching in Dehradun
 
ICT Model Questions
ICT Model Questions ICT Model Questions
ICT Model Questions
 
K to 12_entrep-based_pc_hardware_servicing_learning_module
K to 12_entrep-based_pc_hardware_servicing_learning_moduleK to 12_entrep-based_pc_hardware_servicing_learning_module
K to 12_entrep-based_pc_hardware_servicing_learning_module
 
K to 12 Mechanical Drafting Learning Module
K to 12 Mechanical Drafting Learning ModuleK to 12 Mechanical Drafting Learning Module
K to 12 Mechanical Drafting Learning Module
 
Ict week 1 computer definition, purpose & importance
Ict week 1 computer definition, purpose & importanceIct week 1 computer definition, purpose & importance
Ict week 1 computer definition, purpose & importance
 

Similar to Slide advlow memory algorithm

MATLAB training program Brochure modified.docx
MATLAB training program Brochure modified.docxMATLAB training program Brochure modified.docx
MATLAB training program Brochure modified.docxPriyanka Reddy
 
I present someone's paper on eye tracking and web design.
I present someone's paper on eye tracking and web design.I present someone's paper on eye tracking and web design.
I present someone's paper on eye tracking and web design.Fajar Purnama
 
CiviLions GIT civil newsletter vol 1 issue-2
CiviLions GIT civil newsletter vol 1 issue-2CiviLions GIT civil newsletter vol 1 issue-2
CiviLions GIT civil newsletter vol 1 issue-2Sachin PatiL
 
Electronics and Computer Project Report Template and Guidelines 2020.pdf
Electronics and Computer Project Report Template and Guidelines 2020.pdfElectronics and Computer Project Report Template and Guidelines 2020.pdf
Electronics and Computer Project Report Template and Guidelines 2020.pdfAmritSapkota9
 
Unit 3: Programming with C/C++ contd.
Unit 3: Programming with C/C++ contd.Unit 3: Programming with C/C++ contd.
Unit 3: Programming with C/C++ contd.Dr Piyush Charan
 
List of ICT Tools for Teaching and Learning.pdf
List of ICT Tools for Teaching and Learning.pdfList of ICT Tools for Teaching and Learning.pdf
List of ICT Tools for Teaching and Learning.pdfDr. Manjunatha. P
 
Wireless charger for_low_power_devices_ excellent one same
Wireless charger for_low_power_devices_ excellent one sameWireless charger for_low_power_devices_ excellent one same
Wireless charger for_low_power_devices_ excellent one sameIbrahim Khleifat
 
information-technology-engineering-syllabus-sem-v-mumbai-university.pdf
information-technology-engineering-syllabus-sem-v-mumbai-university.pdfinformation-technology-engineering-syllabus-sem-v-mumbai-university.pdf
information-technology-engineering-syllabus-sem-v-mumbai-university.pdfVirajKale9
 

Similar to Slide advlow memory algorithm (10)

MATLAB training program Brochure modified.docx
MATLAB training program Brochure modified.docxMATLAB training program Brochure modified.docx
MATLAB training program Brochure modified.docx
 
I present someone's paper on eye tracking and web design.
I present someone's paper on eye tracking and web design.I present someone's paper on eye tracking and web design.
I present someone's paper on eye tracking and web design.
 
CiviLions GIT civil newsletter vol 1 issue-2
CiviLions GIT civil newsletter vol 1 issue-2CiviLions GIT civil newsletter vol 1 issue-2
CiviLions GIT civil newsletter vol 1 issue-2
 
Electronics and Computer Project Report Template and Guidelines 2020.pdf
Electronics and Computer Project Report Template and Guidelines 2020.pdfElectronics and Computer Project Report Template and Guidelines 2020.pdf
Electronics and Computer Project Report Template and Guidelines 2020.pdf
 
Unit 3: Programming with C/C++ contd.
Unit 3: Programming with C/C++ contd.Unit 3: Programming with C/C++ contd.
Unit 3: Programming with C/C++ contd.
 
List of ICT Tools for Teaching and Learning.pdf
List of ICT Tools for Teaching and Learning.pdfList of ICT Tools for Teaching and Learning.pdf
List of ICT Tools for Teaching and Learning.pdf
 
August agenda
August agendaAugust agenda
August agenda
 
Wireless charger for_low_power_devices_ excellent one same
Wireless charger for_low_power_devices_ excellent one sameWireless charger for_low_power_devices_ excellent one same
Wireless charger for_low_power_devices_ excellent one same
 
Intelligent ebook
Intelligent ebookIntelligent ebook
Intelligent ebook
 
information-technology-engineering-syllabus-sem-v-mumbai-university.pdf
information-technology-engineering-syllabus-sem-v-mumbai-university.pdfinformation-technology-engineering-syllabus-sem-v-mumbai-university.pdf
information-technology-engineering-syllabus-sem-v-mumbai-university.pdf
 

Recently uploaded

Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 

Recently uploaded (20)

Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 

Slide advlow memory algorithm

  • 1. A Presentation on Memory Effcient Algorithms April 2019 CSE6408 Student ID:0419052090 Bangladesh University of Engineering and Technology July 2, 2019 Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 1 / 36
  • 2. Low Memory Algorithm Motivation Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 2 / 36
  • 3. Low Memory Algorithm Motivation In-place Model Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 2 / 36
  • 4. Low Memory Algorithm Motivation In-place Model Read-Only Model Time Interval Problem Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 2 / 36
  • 5. Low Memory Algorithm Motivation In-place Model Read-Only Model Time Interval Problem Snake/Snail Problem Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 2 / 36
  • 6. Low Memory Algorithm Motivation In-place Model Read-Only Model Time Interval Problem Snake/Snail Problem Cycle Counting Problem Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 2 / 36
  • 7. Objective: Objective of memory efficient algorithm is to reduce working storeage requirement in the expense of limited inefficiency in the running time. Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 3 / 36
  • 8. In-place-Model: Input data can be changed during the execution and after execution each object is in the input array Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 4 / 36
  • 9. Read-Only-Model: Input data structure is read only memory that is input data structure remains unchanged after execution.Here we solve all the problem using Read-only-Model. Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 5 / 36
  • 10. Time Interval Problem Problem Definition: Suppose you are working for a company. You are now looking at a list of monthly profit and loss and wonder when the company was best. To measure the company’s commercial activity, you can define the total amount of profit for consecutive months. month 1 2 3 4 5 6 7 8 9 10 11 12 profit 4 -3 5 -7 9 -2 5 -7 9 -2 -5 6 Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 6 / 36
  • 11. Algorithm 1 Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 7 / 36
  • 12. Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 8 / 36
  • 13. Algorithm 1 Time complexity O(n2) Space complexity O(n2) Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 9 / 36
  • 14. Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 10 / 36
  • 15. Algorithm 2 Time complexity O(n2) Space complexity O(n) Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 11 / 36
  • 16. Algorithm 3 month 1 2 3 4 5 6 7 8 9 10 11 12 profit 4 -3 5 -7 9 -2 5 -7 9 -2 -5 6 Sum 4 1 6 -1 8 6 11 4 13 11 6 12 Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 12 / 36
  • 17. Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 13 / 36
  • 18. Algorithm 3 Time complexity O(n) Space complexity O(n) Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 14 / 36
  • 19. Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 15 / 36
  • 20. Lemma Given a list of profit and loss for n months in a read-only array, Algorithm 4 finds the best time interval in O(n) time without using an extra array. Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 16 / 36
  • 21. Snake or Snail: Detection of a Cycle Problem Problem Definition: Suppose we have a linked list with single pointers. Given a pointer to the head of such a linked-list, we want to determine whether it contains a cycle or not. Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 17 / 36
  • 22. Snake When we traverse the list one after another,if NULL is found at any point the it will be considered as ”Snake”. Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 18 / 36
  • 23. Snail If the exist a cycle in the list then it will be considered as ”Snail”. Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 19 / 36
  • 24. Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 20 / 36
  • 25. Algorithm 1 Time complexity O(n2) Space complexity O(n) Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 21 / 36
  • 26. Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 22 / 36
  • 27. Algorithm 2 Time complexity O(n) Space complexity O(n) Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 23 / 36
  • 28. Algorithm 3:The Tortoise and Hare Algorithm Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 24 / 36
  • 29. Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 25 / 36
  • 30. Algorithm 3 Time complexity O(n) Space complexity O(1) Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 26 / 36
  • 31. Lemma Algorithm T and H correctly determine snake/snail distinction of a given list containing n list elements in O(n) time using only O(1) working space. Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 27 / 36
  • 32. Cycle Counting Problem Problem Definition: Given a 2-regular graph G by a sequence of n pairs on integers between 1 and n on a read-only array, give an efficient algorithm which counts the number of cycles in G using only constant work space. Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 28 / 36
  • 33. 2-Regular Graph: A 2-Regular Graph is a regular graph where number of degree of each vertex is 2 i.e,each vertex has 2 edge. Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 29 / 36
  • 34. Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 30 / 36
  • 35. Algorithm 1 Time complexity O(n) Space complexity O(n) Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 31 / 36
  • 36. Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 32 / 36
  • 37. Algorithm 2 Time complexity O(n2) Space complexity O(1) Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 33 / 36
  • 38. Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 34 / 36
  • 39. Algorithm 3 Time complexity O(nlogn) Space complexity O(1) Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 35 / 36
  • 40. Thank You! Student ID:0419052090 (Bangladesh University of Engineering and Technology)A Presentation on Memory Effcient Algorithms July 2, 2019 36 / 36