Pomegranate NS08 Smart Phone
The Pomegranate NS08, before any of you get any ideas..
I want to clarify that no such device actually existent.
Nova Scotia created the rumor of the phone to get people to visit there site.The website is very realistic and actually very entertaining.I recommend you guys to visit it.
Site: www[dot]pomegranatephone[dot]com
It’s too bad that it doesn’t exist because a device like this would be all other phones out of business.
It is a very interesting concept, The site claims that Pomegranate NS08 does all the essential tasks an IPhone can do and more.
For instance, it can be a
* Camera
* Internet
* GPS Navigation
* Projector
* Global Voice translator
* Shaver
* Coffee Brewer
* Harmonica
WoW ! That is a great dream too bad it cant become reality..
Because No such device is possible..
Did Anyone have have ever seen the movie "Shorts" !?
Site: www[dot]imdb[dot]com/title/tt1100119/
We come across a same (so called vision) concept in it
But we must consider the practical side of it...
Which is impossible not in this shape and side that is..
and power, what about power !?...
our normal batteries won't last a single cup of coffee...
So we need some supper technology to store energy,
That looks good now what !?
Well now we need some kind of supper charger that charges the battery in at least 1hr from zero to full...
There is a glitch in it again...
Would we able to pay that much amount of electricity bill !? lolzz
and that is not the end of it...
so we need some new techs for the coffee maker
A small microwave emitting rod to make the coffee hot,
hmm, and what if our phone signals are disturbed because of the microwave !?
so we need a microwave shield,
Next...
Nothing first do that then I will ask more Questions...
So, We have to wait for these technologies to be available, and then wait longer so that they could be combined to make a "Pomegranate NS08"..
Logic Programming with PROLOG
* Logic Programming
Definition: A logic program is a finite set of rules
The meaning of a logic program P, M(P), is the set of ground goals deducible from P.
* Application Areas:
1. Database
2. Expert Systems
3. Theorem Proving
4. Natural Language Processing
A Prolog program is just a, Database consisting many clauses, a clause is either a fact or a rule
These facts & rules model a problem world by expressing relationship between things (NOT instructions).
* PROLOG system are interactive and interpreted.
* The interpreter is called an inference engine.
* A programmer creates a database.
* A user enters queries.
Examples:
A fact in the database
Father(anas,junaid).
father is a predicate. it represents a relationship between anas and junaid, which are called atoms(constant entities).
A query entered after the prompt ?-
?-father(anas,junaid).
The prolog system displays
YES
?-father(junaid,anum).
The prolog system displays
NO
Example Database
father(ali,anum).
father(junaid,farah).
father(junaid,ali).
mother(hira,farah).
mother(farah,rasheed).
mother(faiza,anum).
Variables may take any value.
Variables must start with UPPER CASE letter, e.g Parents.
Predicates(e.g father) and atoms (e.g junaid) are in lower case.
Example queries:
?-father(ali,X).
variable X is instantiated to the value,anum.
X=anum is displayed
Multiple Solutions
?- father(junaid,X).
gives
X=farah
on pressing ';' the next solution is produced:-
X=ali
Solutions are found starting at the top of the database.
Goals and Subgoals
The query
?- father(ali,anum).
is a goal that may succeed or fail.
A goal may consist of subgoals
for example, the query:
?-father(ali,anum),mother(hira,anum).
for this query,the goal, to success, both subgoals must successd.The extra ',' means AND logic.
?-father(X,farah),father(X,ali).
from the previous DB will display
X=junaid.
For each subgoal, search starts at the top of the database.
Backtracking
father(saad,ali).
Add above line at the top of the previous Database and consider the following query:
?-father(X,farah),mother(X,ali).
Search for the 1st subgoal: father(X,farah)
matches with: father(junaid,farah).
returns X=junaid
now the start of 2nd sub-goal father(X,ali).
it finds a match father(saad,ali).
it matches the result with X (junaid) and fails to find a match
now it backtrack to fine another match of previous subgoal
father(junaid,ali) is found on the end try
hence it will return,
X=junaid.
Rules in Prolog
Consider a database with some facts.
father(ali,anum).
father(junaid,farah).
father(junaid,ali).
mother(hira,farah).
mother(farah,rasheed).
mother(faiza,anum).
and the database also has some rule.
parent(X,Y):-father(X,Y).
parent(X,Y):-mother(X,Y).
which means, X is the parent of Y
if X is the father or mother of Y
alternatively:
parent(X,Y) is true, if father(X,Y) is true or if mother(X,Y) is true.
In a rule,
on the left is the conclusion, e.g parent(X,Y)
on the right is the condition, e.g father(X,Y)
Thus if the condition is true then the conclusion is true.
?-parent(hira,farah).
YES is displayed