Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Parenthesis are never needed in prefix or postfix
expressions. Why?

Answer Posted / argha

In case of infix expression, the entry point of the
execution can be either left or right (forget about operator
priority).
Evaluate 2+3*5 from left, it is 30; from right, it is 17.
Convert it to postfix, 235*+, no confusion about the entry
point (and the answer which is 30). If we made it mandatory
for infix expression also that the entry point of evaluation
will be from left, there will not be any need for
parentheses. 2+3*5 will always be 30, to make it 17 write it
as 3*5+2 (in postfix).
Unfortunately, this rule for infix expression is not
mandated when first human mathematicians started thinking
(in early days of civilization). And alas, no common man
will accept this rule if I go to thrust it upon them. So we
have to live with parentheses in infix, and thankfully, none
in prefix or postfix. Machines are more logical being than
human. Agree?In case of infix expression, the entry point of the
execution can be either left or right (forget about operator
priority).
Evaluate 2+3*5 from left, it is 30; from right, it is 17.
Convert it to postfix, 235*+, no confusion about the entry
point (and the answer which is 30). If we made it mandatory
for infix expression also that the entry point of evaluation
will be from left, there will not be any need for
parentheses. 2+3*5 will always be 30, to make it 17 write it
as 3*5+2 (in postfix).
Unfortunately, this rule for infix expression is not
mandated when first human mathematicians started thinking
(in early days of civilization). And alas, no common man
will accept this rule if I go to thrust it upon them. So we
have to live with parentheses in infix, and thankfully, none
in prefix or postfix. Machines are more logical being than
human. Agree?In case of infix expression, the entry point of the
execution can be either left or right (forget about operator
priority).
Evaluate 2+3*5 from left, it is 30; from right, it is 17.
Convert it to postfix, 235*+, no confusion about the entry
point (and the answer which is 30). If we made it mandatory
for infix expression also that the entry point of evaluation
will be from left, there will not be any need for
parentheses. 2+3*5 will always be 30, to make it 17 write it
as 3*5+2 (in postfix).
Unfortunately, this rule for infix expression is not
mandated when first human mathematicians started thinking
(in early days of civilization). And alas, no common man
will accept this rule if I go to thrust it upon them. So we
have to live with parentheses in infix, and thankfully, none
in prefix or postfix. Machines are more logical being than
human. Agree?In case of infix expression, the entry point of the
execution can be either left or right (forget about operator
priority).
Evaluate 2+3*5 from left, it is 30; from right, it is 17.
Convert it to postfix, 235*+, no confusion about the entry
point (and the answer which is 30). If we made it mandatory
for infix expression also that the entry point of evaluation
will be from left, there will not be any need for
parentheses. 2+3*5 will always be 30, to make it 17 write it
as 3*5+2 (in postfix).
Unfortunately, this rule for infix expression is not
mandated when first human mathematicians started thinking
(in early days of civilization). And alas, no common man
will accept this rule if I go to thrust it upon them. So we
have to live with parentheses in infix, and thankfully, none
in prefix or postfix. Machines are more logical being than
human. Agree?

Is This Answer Correct ?    1 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does arraylist shrink?

837


Are linked lists considered linear or non-linear data structures?

928


Where will be the free node available while inserting a new node in a linked list?

881


How do you find the space complexity of a bubble sort?

787


Why do we use hashmap?

989


write a program to show the insertion and deletion of an element in an array using the position

826


Why is hashmap faster than treemap?

851


Why concurrenthashmap is fail safe?

912


What does enum do?

856


What is bubble insertion selection sort?

812


How do you sort an array in decreasing order?

790


What is a singletonlist?

837


What is linked list with example?

897


Which sort is best for linked list?

821


Which collection allows null values?

814