SlideShare a Scribd company logo
1 of 15
Dr. D. Y. Patil Pratishthan’s
D.Y. Patil College Of Engineering & Technology,
Kasaba Bawada, Kolhapur
A
Presentation On
“Polish Notation”
Presented By:
1.Daulmalik S. Mujawar.
2.Falaknaz N. Punekar.
3.Rohit Ugave.
4.Prajakta Suryavanshi.
Index
1. Abstract
2. Introduction
3. Problem Statement
4. Approaches to tackle
5. Algorithm and Flow chart
6. Important construct of PL used
7. Result : All Possible input and output
8. Conclusion
9. Application
10.References
Abstract
• To evaluate and simplifies the arithmetic expression given by
an user. The priorities are fixed in the project (^ then * / then +
-). The input string is given by user with minimum 2 operands
with 1 operator.
• Operator Precedence :-
Exponential Operator ^ Highest Precedence
Multiplication/ Division */ Next Precedence
Addition / Subtraction +- Least Precedence
Introduction
• Polish notation, also known as Polish prefix notation or simply prefix notation, is a
form of notation for logic, arithmetic, and algebra.
• Its distinguishing feature is that it places operators to the left of their operands.
• If the arty of the operators is fixed, the result is a syntax lacking parentheses or
other brackets that can still be parsed without ambiguity.
• The Polish logician Jan Łukasiewicz invented this notation in 1924 in order to
simplify sentential logic.
Introduction(cont..)
• Infix :- The infix notation is what we come across in our general mathematics,
where the operator is written in-between the operands.
– For E.g. :- A + B
• Prefix :- The notation in which operator is place before the operands. It is also
called as Polish notation.
– E.g. :- + A B
• Postfix :- The notation in which operator is place after the operands. It is also called
as Reverse Polish notation or simply Suffix Notation.
– E.g. :- A B +
Problem Statement
• Computer doesn’t understand the regular mathematical expression. So,
complier needs to converts the regular expression into polish (prefix) notation
expression for performing evaluation operation.
• Read an expression in Polish notation, To simplify the Polish notation
expression as much as possible.
Case 1: + 3 4
Case 2: - x x
Case 3: * - 6 + x -6 - - 9 6 * 0 c
7
- x x
* - 6 + x -6 - 3 * 0 c
APPROACHES TO TACKLE :
2.1Using Array
We use array, in which array acts as stack and push and pop operations are performed on array
stack.
Eg:-
Stc[20];
For(i=0;i<20;i++)
{
Scanf(“%d”,&a[i]);
}
2.2Using structure
In instead we can use structure to create stack and with top of stack.Object of a structure is
considered as stack, and members of structure defines top of stack, terminals and non-terminals.
Struct stack1{
Int tos=-1;
Char tr,ntr;
} s[100];
ALGORITHM
3.1 Logic:
1. Start.
2. Enter the mathematical expression in polish notation.
3. Check entered expression is Prefix. If NO, go to step 6
4. Evaluate the expression.
5. Display the result
6. End.
Start
Initialization
Evaluate
Expression
End
Check
expression
Is Prefix
NO
Yes
IMPORTANCE CONSTRUCTOR OF USED :
Work related to checking entered expression is prefix.
function’s used:
•isopnd (char)
This function is use to check the current element field is operand or not. If it’s a operand then it
will push on to the stack and pointer is move to ext position.
•isoprtr (char)
This function is use to check the current element field is operator or not. If it’s a operand then it
will push on to the stack and top is move to next position.
•evaluate (char, int, int)
This function is use to evaluate the given expression if two consecutive operator are pushed to the
stack and after that push two consecutive operands on to stack then it evaluate this expression.
•strlen()
This is a inbuilt function which is used to calculate the length of given expression.
SCREENSHOOT
For the Expression – X X
For the Expression * - 6 + x - 6- - 9 6 * 1 c
Conclusion
• For evaluating given arithmetic expression Calculator /
Computer needs simplified expressions. With the help of
polish notation, the complex notation gets simplifies.
• This Program will be used to simplify the complex
mathematical polish notation expressions. This makes
compiler to read the simplified expression effectively.
Application
• For evaluating given arithmetic expression.
• Calculator.
References / Bibliography
• Books
– Data Structures with C (Schaum's Outline Series) -by Seymour Lipschutz
– Let Us C (Computer Science) -by Yashavant P. Kanetkar
• Websites
– The ACM International Collegiate Programming Contest (ICPC)
https://icpc.baylor.edu/
– Stack Overflow
http://stackoverflow.com/
– Polish notation
https://en.wikipedia.org/wiki/Polish_notation
– Tutorials Point
http://www.tutorialspoint.com/data_structures_algorithms/expressionparsing.htm

More Related Content

What's hot

Implementation of Reversable Logic Based Design using Submicron Technology
Implementation of Reversable Logic Based Design using Submicron TechnologyImplementation of Reversable Logic Based Design using Submicron Technology
Implementation of Reversable Logic Based Design using Submicron TechnologySai Viswanath
 
Topic 1.4: Randomized Algorithms
Topic 1.4: Randomized AlgorithmsTopic 1.4: Randomized Algorithms
Topic 1.4: Randomized AlgorithmsKM Bappi
 
1.9. minimization of dfa
1.9. minimization of dfa1.9. minimization of dfa
1.9. minimization of dfaSampath Kumar S
 
Compiler Design Basics
Compiler Design BasicsCompiler Design Basics
Compiler Design BasicsAkhil Kaushik
 
MIXED SIGNAL VLSI TECHNOLOGY BASED SoC DESIGN FOR TEMPERATURE COMPENSATED pH...
MIXED SIGNAL VLSI TECHNOLOGY BASED SoC DESIGN FOR TEMPERATURE COMPENSATED  pH...MIXED SIGNAL VLSI TECHNOLOGY BASED SoC DESIGN FOR TEMPERATURE COMPENSATED  pH...
MIXED SIGNAL VLSI TECHNOLOGY BASED SoC DESIGN FOR TEMPERATURE COMPENSATED pH...Abhijeet Powar
 
IP forwarding architectures and Overlay Model
IP forwarding architectures and Overlay ModelIP forwarding architectures and Overlay Model
IP forwarding architectures and Overlay ModelPradnya Saval
 
Mealy and moore machine
Mealy and moore machineMealy and moore machine
Mealy and moore machineEhatsham Riaz
 
8257 DMA Controller
8257 DMA Controller8257 DMA Controller
8257 DMA ControllerShivamSood22
 
Floyd warshall algorithm
Floyd warshall algorithmFloyd warshall algorithm
Floyd warshall algorithmA. S. M. Shafi
 
Modules and ports in Verilog HDL
Modules and ports in Verilog HDLModules and ports in Verilog HDL
Modules and ports in Verilog HDLanand hd
 
Optimization of basic blocks
Optimization of basic blocksOptimization of basic blocks
Optimization of basic blocksishwarya516
 
System verilog assertions
System verilog assertionsSystem verilog assertions
System verilog assertionsHARINATH REDDY
 
Python unit 2 as per Anna university syllabus
Python unit 2 as per Anna university syllabusPython unit 2 as per Anna university syllabus
Python unit 2 as per Anna university syllabusDhivyaSubramaniyam
 

What's hot (20)

Implementation of Reversable Logic Based Design using Submicron Technology
Implementation of Reversable Logic Based Design using Submicron TechnologyImplementation of Reversable Logic Based Design using Submicron Technology
Implementation of Reversable Logic Based Design using Submicron Technology
 
Topic 1.4: Randomized Algorithms
Topic 1.4: Randomized AlgorithmsTopic 1.4: Randomized Algorithms
Topic 1.4: Randomized Algorithms
 
1.9. minimization of dfa
1.9. minimization of dfa1.9. minimization of dfa
1.9. minimization of dfa
 
Compiler Design Basics
Compiler Design BasicsCompiler Design Basics
Compiler Design Basics
 
MIXED SIGNAL VLSI TECHNOLOGY BASED SoC DESIGN FOR TEMPERATURE COMPENSATED pH...
MIXED SIGNAL VLSI TECHNOLOGY BASED SoC DESIGN FOR TEMPERATURE COMPENSATED  pH...MIXED SIGNAL VLSI TECHNOLOGY BASED SoC DESIGN FOR TEMPERATURE COMPENSATED  pH...
MIXED SIGNAL VLSI TECHNOLOGY BASED SoC DESIGN FOR TEMPERATURE COMPENSATED pH...
 
Embedded C - Lecture 1
Embedded C - Lecture 1Embedded C - Lecture 1
Embedded C - Lecture 1
 
IP forwarding architectures and Overlay Model
IP forwarding architectures and Overlay ModelIP forwarding architectures and Overlay Model
IP forwarding architectures and Overlay Model
 
Phases of compiler
Phases of compilerPhases of compiler
Phases of compiler
 
Mealy and moore machine
Mealy and moore machineMealy and moore machine
Mealy and moore machine
 
Interrupts
InterruptsInterrupts
Interrupts
 
Parsing
ParsingParsing
Parsing
 
8257 DMA Controller
8257 DMA Controller8257 DMA Controller
8257 DMA Controller
 
Floyd warshall algorithm
Floyd warshall algorithmFloyd warshall algorithm
Floyd warshall algorithm
 
Modules and ports in Verilog HDL
Modules and ports in Verilog HDLModules and ports in Verilog HDL
Modules and ports in Verilog HDL
 
Optimization of basic blocks
Optimization of basic blocksOptimization of basic blocks
Optimization of basic blocks
 
System verilog assertions
System verilog assertionsSystem verilog assertions
System verilog assertions
 
Conditional branches
Conditional branchesConditional branches
Conditional branches
 
Operators
OperatorsOperators
Operators
 
Types of Compilers
Types of CompilersTypes of Compilers
Types of Compilers
 
Python unit 2 as per Anna university syllabus
Python unit 2 as per Anna university syllabusPython unit 2 as per Anna university syllabus
Python unit 2 as per Anna university syllabus
 

Viewers also liked

Statements conclusions
Statements conclusionsStatements conclusions
Statements conclusionsMohammed Ali
 
Sitting arangements
Sitting arangementsSitting arangements
Sitting arangementsMohammed Ali
 
Pm arabic ch8 صياغة التقارير وغلق المشروع
Pm arabic ch8 صياغة التقارير وغلق المشروعPm arabic ch8 صياغة التقارير وغلق المشروع
Pm arabic ch8 صياغة التقارير وغلق المشروعkhalid Dahleez
 
Localization and internationalization principles power point by darlena pagan
Localization and internationalization principles power point by darlena paganLocalization and internationalization principles power point by darlena pagan
Localization and internationalization principles power point by darlena paganUSA Discussion Group
 
Pm arabic ch7 الموارد البشریة وإدارة فریق المشروع
Pm arabic ch7 الموارد البشریة وإدارة فریق المشروعPm arabic ch7 الموارد البشریة وإدارة فریق المشروع
Pm arabic ch7 الموارد البشریة وإدارة فریق المشروعkhalid Dahleez
 
Economic Situation Evaluation on Denmark
Economic Situation Evaluation on DenmarkEconomic Situation Evaluation on Denmark
Economic Situation Evaluation on DenmarkKhan Tanjeel Ahmed
 
Credit Management Practices of BDBL
Credit Management Practices of BDBLCredit Management Practices of BDBL
Credit Management Practices of BDBLKhan Tanjeel Ahmed
 
Sales promotion assignment
Sales promotion assignmentSales promotion assignment
Sales promotion assignmentMarke Greene
 
9 core activity we need to have a succesful project management
9 core activity we need to have a succesful project management9 core activity we need to have a succesful project management
9 core activity we need to have a succesful project managementMarke Greene
 
Chapter 6: Writing Objective Test Items
Chapter 6: Writing Objective Test ItemsChapter 6: Writing Objective Test Items
Chapter 6: Writing Objective Test ItemsSHELAMIE SANTILLAN
 
abdul sattar edhi
abdul sattar edhiabdul sattar edhi
abdul sattar edhiFahadi302
 
Chapter 13 - I/O Systems
Chapter 13 - I/O SystemsChapter 13 - I/O Systems
Chapter 13 - I/O SystemsWayne Jones Jnr
 
WordCamp Auckland 2017 summary
WordCamp Auckland 2017 summaryWordCamp Auckland 2017 summary
WordCamp Auckland 2017 summaryRalf Klis
 

Viewers also liked (20)

Cross domain
Cross domainCross domain
Cross domain
 
Statements conclusions
Statements conclusionsStatements conclusions
Statements conclusions
 
Sitting arangements
Sitting arangementsSitting arangements
Sitting arangements
 
Pm arabic ch8 صياغة التقارير وغلق المشروع
Pm arabic ch8 صياغة التقارير وغلق المشروعPm arabic ch8 صياغة التقارير وغلق المشروع
Pm arabic ch8 صياغة التقارير وغلق المشروع
 
Localization and internationalization principles power point by darlena pagan
Localization and internationalization principles power point by darlena paganLocalization and internationalization principles power point by darlena pagan
Localization and internationalization principles power point by darlena pagan
 
Pm arabic ch7 الموارد البشریة وإدارة فریق المشروع
Pm arabic ch7 الموارد البشریة وإدارة فریق المشروعPm arabic ch7 الموارد البشریة وإدارة فریق المشروع
Pm arabic ch7 الموارد البشریة وإدارة فریق المشروع
 
Economic Situation Evaluation on Denmark
Economic Situation Evaluation on DenmarkEconomic Situation Evaluation on Denmark
Economic Situation Evaluation on Denmark
 
Credit Management Practices of BDBL
Credit Management Practices of BDBLCredit Management Practices of BDBL
Credit Management Practices of BDBL
 
Alienware
AlienwareAlienware
Alienware
 
Sales promotion assignment
Sales promotion assignmentSales promotion assignment
Sales promotion assignment
 
9 core activity we need to have a succesful project management
9 core activity we need to have a succesful project management9 core activity we need to have a succesful project management
9 core activity we need to have a succesful project management
 
Coaching ontologico PIADE
Coaching ontologico PIADECoaching ontologico PIADE
Coaching ontologico PIADE
 
Introduccion a Triz.
Introduccion a Triz.Introduccion a Triz.
Introduccion a Triz.
 
Chapter 6: Writing Objective Test Items
Chapter 6: Writing Objective Test ItemsChapter 6: Writing Objective Test Items
Chapter 6: Writing Objective Test Items
 
abdul sattar edhi
abdul sattar edhiabdul sattar edhi
abdul sattar edhi
 
Chapter 13 - I/O Systems
Chapter 13 - I/O SystemsChapter 13 - I/O Systems
Chapter 13 - I/O Systems
 
Onsite Journal
Onsite JournalOnsite Journal
Onsite Journal
 
Gestión humana
Gestión humanaGestión humana
Gestión humana
 
WordCamp Auckland 2017 summary
WordCamp Auckland 2017 summaryWordCamp Auckland 2017 summary
WordCamp Auckland 2017 summary
 
Perico trepa por chile
Perico trepa por chilePerico trepa por chile
Perico trepa por chile
 

Similar to Polish

Unit 3 Stacks and Queues.pptx
Unit 3 Stacks and Queues.pptxUnit 3 Stacks and Queues.pptx
Unit 3 Stacks and Queues.pptxYogesh Pawar
 
Data Structures in C
Data Structures in CData Structures in C
Data Structures in CJabs6
 
Stack_Overview_Implementation_WithVode.pptx
Stack_Overview_Implementation_WithVode.pptxStack_Overview_Implementation_WithVode.pptx
Stack_Overview_Implementation_WithVode.pptxchandankumar364348
 
sweetu stacks.pdf
sweetu stacks.pdfsweetu stacks.pdf
sweetu stacks.pdfmohit476551
 
Unit II - LINEAR DATA STRUCTURES
Unit II -  LINEAR DATA STRUCTURESUnit II -  LINEAR DATA STRUCTURES
Unit II - LINEAR DATA STRUCTURESUsha Mahalingam
 
01 stack 20160908_jintaek_seo
01 stack 20160908_jintaek_seo01 stack 20160908_jintaek_seo
01 stack 20160908_jintaek_seoJinTaek Seo
 
Functional Programming.pptx
Functional Programming.pptxFunctional Programming.pptx
Functional Programming.pptxKarthickT28
 
C operators
C operatorsC operators
C operatorsGPERI
 
Although people may be very accustomed to reading and understanding .docx
Although people may be very accustomed to reading and understanding .docxAlthough people may be very accustomed to reading and understanding .docx
Although people may be very accustomed to reading and understanding .docxmilissaccm
 
Topic 2_revised.pptx
Topic 2_revised.pptxTopic 2_revised.pptx
Topic 2_revised.pptxJAYAPRIYAR7
 
Unit 2 application of stack
Unit 2  application of stack Unit 2  application of stack
Unit 2 application of stack LavanyaJ28
 
Programming fundamentals 2:pointers in c++ clearly explained
Programming fundamentals 2:pointers in c++ clearly explainedProgramming fundamentals 2:pointers in c++ clearly explained
Programming fundamentals 2:pointers in c++ clearly explainedhozaifafadl
 
Designing A Syntax Based Retrieval System03
Designing A Syntax Based Retrieval System03Designing A Syntax Based Retrieval System03
Designing A Syntax Based Retrieval System03Avelin Huo
 
07 control+structures
07 control+structures07 control+structures
07 control+structuresbaran19901990
 

Similar to Polish (20)

Unit 3 Stacks and Queues.pptx
Unit 3 Stacks and Queues.pptxUnit 3 Stacks and Queues.pptx
Unit 3 Stacks and Queues.pptx
 
Data Structures in C
Data Structures in CData Structures in C
Data Structures in C
 
Stack_Overview_Implementation_WithVode.pptx
Stack_Overview_Implementation_WithVode.pptxStack_Overview_Implementation_WithVode.pptx
Stack_Overview_Implementation_WithVode.pptx
 
DSA
DSADSA
DSA
 
sweetu stacks.pdf
sweetu stacks.pdfsweetu stacks.pdf
sweetu stacks.pdf
 
Unit II - LINEAR DATA STRUCTURES
Unit II -  LINEAR DATA STRUCTURESUnit II -  LINEAR DATA STRUCTURES
Unit II - LINEAR DATA STRUCTURES
 
01 stack 20160908_jintaek_seo
01 stack 20160908_jintaek_seo01 stack 20160908_jintaek_seo
01 stack 20160908_jintaek_seo
 
85ec7 session2 c++
85ec7 session2 c++85ec7 session2 c++
85ec7 session2 c++
 
Functional Programming.pptx
Functional Programming.pptxFunctional Programming.pptx
Functional Programming.pptx
 
C operators
C operatorsC operators
C operators
 
Chapter 6 ds
Chapter 6 dsChapter 6 ds
Chapter 6 ds
 
Although people may be very accustomed to reading and understanding .docx
Although people may be very accustomed to reading and understanding .docxAlthough people may be very accustomed to reading and understanding .docx
Although people may be very accustomed to reading and understanding .docx
 
Topic 2_revised.pptx
Topic 2_revised.pptxTopic 2_revised.pptx
Topic 2_revised.pptx
 
C++.pptx
C++.pptxC++.pptx
C++.pptx
 
Unit 2 application of stack
Unit 2  application of stack Unit 2  application of stack
Unit 2 application of stack
 
Java chapter 3
Java chapter 3Java chapter 3
Java chapter 3
 
Programming fundamentals 2:pointers in c++ clearly explained
Programming fundamentals 2:pointers in c++ clearly explainedProgramming fundamentals 2:pointers in c++ clearly explained
Programming fundamentals 2:pointers in c++ clearly explained
 
Designing A Syntax Based Retrieval System03
Designing A Syntax Based Retrieval System03Designing A Syntax Based Retrieval System03
Designing A Syntax Based Retrieval System03
 
07 control+structures
07 control+structures07 control+structures
07 control+structures
 
Unit - 2 CAP.pptx
Unit - 2 CAP.pptxUnit - 2 CAP.pptx
Unit - 2 CAP.pptx
 

Recently uploaded

College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
(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
 
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
 
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
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
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
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
(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
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
(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
 
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
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 

Recently uploaded (20)

College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
(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
 
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...
 
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
 
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
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
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
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
(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...
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
(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...
 
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
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 

Polish

  • 1. Dr. D. Y. Patil Pratishthan’s D.Y. Patil College Of Engineering & Technology, Kasaba Bawada, Kolhapur A Presentation On “Polish Notation” Presented By: 1.Daulmalik S. Mujawar. 2.Falaknaz N. Punekar. 3.Rohit Ugave. 4.Prajakta Suryavanshi.
  • 2. Index 1. Abstract 2. Introduction 3. Problem Statement 4. Approaches to tackle 5. Algorithm and Flow chart 6. Important construct of PL used 7. Result : All Possible input and output 8. Conclusion 9. Application 10.References
  • 3. Abstract • To evaluate and simplifies the arithmetic expression given by an user. The priorities are fixed in the project (^ then * / then + -). The input string is given by user with minimum 2 operands with 1 operator. • Operator Precedence :- Exponential Operator ^ Highest Precedence Multiplication/ Division */ Next Precedence Addition / Subtraction +- Least Precedence
  • 4. Introduction • Polish notation, also known as Polish prefix notation or simply prefix notation, is a form of notation for logic, arithmetic, and algebra. • Its distinguishing feature is that it places operators to the left of their operands. • If the arty of the operators is fixed, the result is a syntax lacking parentheses or other brackets that can still be parsed without ambiguity. • The Polish logician Jan Łukasiewicz invented this notation in 1924 in order to simplify sentential logic.
  • 5. Introduction(cont..) • Infix :- The infix notation is what we come across in our general mathematics, where the operator is written in-between the operands. – For E.g. :- A + B • Prefix :- The notation in which operator is place before the operands. It is also called as Polish notation. – E.g. :- + A B • Postfix :- The notation in which operator is place after the operands. It is also called as Reverse Polish notation or simply Suffix Notation. – E.g. :- A B +
  • 6. Problem Statement • Computer doesn’t understand the regular mathematical expression. So, complier needs to converts the regular expression into polish (prefix) notation expression for performing evaluation operation. • Read an expression in Polish notation, To simplify the Polish notation expression as much as possible. Case 1: + 3 4 Case 2: - x x Case 3: * - 6 + x -6 - - 9 6 * 0 c 7 - x x * - 6 + x -6 - 3 * 0 c
  • 7. APPROACHES TO TACKLE : 2.1Using Array We use array, in which array acts as stack and push and pop operations are performed on array stack. Eg:- Stc[20]; For(i=0;i<20;i++) { Scanf(“%d”,&a[i]); } 2.2Using structure In instead we can use structure to create stack and with top of stack.Object of a structure is considered as stack, and members of structure defines top of stack, terminals and non-terminals. Struct stack1{ Int tos=-1; Char tr,ntr; } s[100];
  • 8. ALGORITHM 3.1 Logic: 1. Start. 2. Enter the mathematical expression in polish notation. 3. Check entered expression is Prefix. If NO, go to step 6 4. Evaluate the expression. 5. Display the result 6. End.
  • 10. IMPORTANCE CONSTRUCTOR OF USED : Work related to checking entered expression is prefix. function’s used: •isopnd (char) This function is use to check the current element field is operand or not. If it’s a operand then it will push on to the stack and pointer is move to ext position. •isoprtr (char) This function is use to check the current element field is operator or not. If it’s a operand then it will push on to the stack and top is move to next position. •evaluate (char, int, int) This function is use to evaluate the given expression if two consecutive operator are pushed to the stack and after that push two consecutive operands on to stack then it evaluate this expression. •strlen() This is a inbuilt function which is used to calculate the length of given expression.
  • 12. For the Expression * - 6 + x - 6- - 9 6 * 1 c
  • 13. Conclusion • For evaluating given arithmetic expression Calculator / Computer needs simplified expressions. With the help of polish notation, the complex notation gets simplifies. • This Program will be used to simplify the complex mathematical polish notation expressions. This makes compiler to read the simplified expression effectively.
  • 14. Application • For evaluating given arithmetic expression. • Calculator.
  • 15. References / Bibliography • Books – Data Structures with C (Schaum's Outline Series) -by Seymour Lipschutz – Let Us C (Computer Science) -by Yashavant P. Kanetkar • Websites – The ACM International Collegiate Programming Contest (ICPC) https://icpc.baylor.edu/ – Stack Overflow http://stackoverflow.com/ – Polish notation https://en.wikipedia.org/wiki/Polish_notation – Tutorials Point http://www.tutorialspoint.com/data_structures_algorithms/expressionparsing.htm