FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Forum index » Science and Technology » Math
Fuzzy Booleans with Application
Post new topic   Reply to topic Page 1 of 1 [12 Posts] View previous topic :: View next topic
Author Message
Han de Bruijn
science forum Guru


Joined: 18 May 2005
Posts: 1285

PostPosted: Thu Jun 15, 2006 12:26 pm    Post subject: Fuzzy Booleans with Application Reply with quote

The article

http://groups.google.nl/group/sci.math/msg/9d9cb806915d607c?hl=nl&

has to be updated. New theory in the document:

http://hdebruijn.soo.dto.tudelft.nl/jaar2006/margriet.pdf

Gist of the argument. Instead of boolean variables with values in {0,1}
define real variables with values in {x | 0 <= x <= 1}. Then define the
union U, intersection . and complement ~ of the real values as follows:

a U b = a + b - a.b ; a.b = a.b (algebraically) ; ~a = 1 - a

Logical equivalence (read: equality) is worked out as follows.

(a.b) U (~a.~b) = a.b + (1-a)(1-b) - a.b.(1-a)(1-b)

But, our theory about Idealization, Materialization, Renormalization by
Fuzzyfication is no longer just another theory.

It has become a technology now! A technology that can be used e.g. for
detecting the differences in two pictures that are nearly the same (as
in some puzzles for children, called "zoekplaatjes" in Dutch):

http://hdebruijn.soo.dto.tudelft.nl/fototjes/gezocht.htm

Here is the program that detects the differences in two pictures which
are nearly the same, together with its Delphi (Pascal) sources:

http://hdebruijn.soo.dto.tudelft.nl/jaar2006/MARGRIET.ZIP

Some sample pictures are needed as well:

http://hdebruijn.soo.dto.tudelft.nl/jaar2006/PLAATJES.ZIP

Directions for use under MS Windows:

1. Make a subdirectory & go in there
2. Unzip MARGRIET (e.g. with pkunzip)
3. Unzip PLAATJES (e.g. with pkunzip)
4. Run Project1 (executable)
5. Load 2 nearly equal pictures
6. Process and watch reddish colors
by 'Fuzzy Equal' or 'Fuzzy Logic'

The program maps one picture upon the other by translation and (slight)
rotation. Since the "zoekplaatjes" (- what is the English term? -) are
supposed to be the "same", no distortion or magnification is involved:

http://www.puzzels.bambamscorner.nl/zoekplaat/index.php

But there _is_ a difference in colors at the same spot, even if the two
pictures are supposed to be the same there. That's the place where the
Fuzzy Equality comes in: exp (-A^2/2) where A = (color1 - color2)/sigma
or even better x.y + (1-x)(1-y)(1-x.y) where x = color1, y = color2 .
Visualized (with 'Project2.exe') as a function of x and y:

http://hdebruijn.soo.dto.tudelft.nl/QED/vagelijk.jpg

Han de Bruijn
Back to top
Han de Bruijn
science forum Guru


Joined: 18 May 2005
Posts: 1285

PostPosted: Thu Jun 15, 2006 1:28 pm    Post subject: Re: Fuzzy Booleans with Application Reply with quote

Han de Bruijn wrote:

Quote:
or even better x.y + (1-x)(1-y)(1-x.y) where x = color1, y = color2 .

This can be simplified further to x.y + (1-x)(1-y) , which is a bilinear
interpolation between the corner values [ (0,0) , (1,1) : equality = 1 ]
and [ (0,1) , (1,0) : inequality = 0 ] .

Han de Bruijn
Back to top
William Elliot
science forum Guru


Joined: 24 Mar 2005
Posts: 1906

PostPosted: Thu Jun 15, 2006 1:44 pm    Post subject: Re: Fuzzy Booleans with Application Reply with quote

On Thu, 15 Jun 2006, Han de Bruijn wrote:

Quote:
Gist of the argument. Instead of boolean variables with values in {0,1}
define real variables with values in {x | 0 <= x <= 1}. Then define the
union U, intersection . and complement ~ of the real values as follows:

a U b = a + b - a.b ; a.b = a.b (algebraically) ; ~a = 1 - a

How is this different than probablity density, measure?


Quote:
Logical equivalence (read: equality) is worked out as follows.

(a.b) U (~a.~b) = a.b + (1-a)(1-b) - a.b.(1-a)(1-b)

= ab(1 - (1 - a)(1 - b)) + (1 - a)(1 - b)

= ab(a + b - ab) + 1 - a - b + ab
= 1 - (1 - ab)(a + b - ab)
= ~(~(ab).(aUb))
Back to top
Robert Low
science forum Guru


Joined: 01 May 2005
Posts: 1063

PostPosted: Thu Jun 15, 2006 2:25 pm    Post subject: Re: Fuzzy Booleans with Application Reply with quote

Han de Bruijn wrote:
Quote:
Gist of the argument. Instead of boolean variables with values in {0,1}
define real variables with values in {x | 0 <= x <= 1}. Then define the
union U, intersection . and complement ~ of the real values as follows:
a U b = a + b - a.b ; a.b = a.b (algebraically) ; ~a = 1 - a

Isn't it commoner to use

a u b = max(a,b) and a.b = min(a,b)

in this context? There are quite a few ways of defining
conjunction and disjunction in fuzzy logic, but I was
under the impression that the 'probabilistic' one was
not so useful. This is based on what people have told
me, rather than any form of real knowledge, I admit.
Back to top
Han de Bruijn
science forum Guru


Joined: 18 May 2005
Posts: 1285

PostPosted: Fri Jun 16, 2006 7:15 am    Post subject: Re: Fuzzy Booleans with Application Reply with quote

William Elliot wrote:

Quote:
On Thu, 15 Jun 2006, Han de Bruijn wrote:

Gist of the argument. Instead of boolean variables with values in {0,1}
define real variables with values in {x | 0 <= x <= 1}. Then define the
union U, intersection . and complement ~ of the real values as follows:

a U b = a + b - a.b ; a.b = a.b (algebraically) ; ~a = 1 - a

How is this different than probablity density, measure?

I don't know. But, with probabilities, the term (a.b) is only applicable
- I think - if the chances a and b are "independent". In my system, the
quantities considered are no "probabilities", thereby avoiding all kind
of foundational problems that probability theory may cause. I'm willing
to conform to standard practice if you only explain me how to do it.

Quote:
Logical equivalence (read: equality) is worked out as follows.

(a.b) U (~a.~b) = a.b + (1-a)(1-b) - a.b.(1-a)(1-b)

= ab(1 - (1 - a)(1 - b)) + (1 - a)(1 - b)
= ab(a + b - ab) + 1 - a - b + ab
= 1 - (1 - ab)(a + b - ab)
= ~(~(ab).(aUb))

Yes. And the negation of that is inequality (XOR).

Han de Bruijn
Back to top
Han de Bruijn
science forum Guru


Joined: 18 May 2005
Posts: 1285

PostPosted: Fri Jun 16, 2006 7:21 am    Post subject: Re: Fuzzy Booleans with Application Reply with quote

Robert Low wrote:

Quote:
Isn't it commoner to use

a u b = max(a,b) and a.b = min(a,b)

in this context? There are quite a few ways of defining
conjunction and disjunction in fuzzy logic, but I was
under the impression that the 'probabilistic' one was
not so useful. This is based on what people have told
me, rather than any form of real knowledge, I admit.

How to define then the complement ( ~a ) ?

Han de Bruijn
Back to top
Robert Low
science forum Guru


Joined: 01 May 2005
Posts: 1063

PostPosted: Fri Jun 16, 2006 7:33 am    Post subject: Re: Fuzzy Booleans with Application Reply with quote

Han de Bruijn wrote:
Quote:
Robert Low wrote:
Isn't it commoner to use
a u b = max(a,b) and a.b = min(a,b)
How to define then the complement ( ~a ) ?

1-a.

This is *completely* standard stuff, Han: you might wise to
spend some time reading what has already been done, lest
you invest the same time reinventing a square wheel.
Back to top
Han de Bruijn
science forum Guru


Joined: 18 May 2005
Posts: 1285

PostPosted: Fri Jun 16, 2006 7:52 am    Post subject: Re: Fuzzy Booleans with Application Reply with quote

Robert Low wrote:

Quote:
This is *completely* standard stuff, Han: you might wise to
spend some time reading what has already been done, lest
you invest the same time reinventing a square wheel.

Uhm, it rolls (: I have an application). Therefore my wheels are not
square. And where can I find that it's *completely* standard stuff?

Han de Bruijn
Back to top
Robert Low
science forum Guru


Joined: 01 May 2005
Posts: 1063

PostPosted: Fri Jun 16, 2006 8:30 am    Post subject: Re: Fuzzy Booleans with Application Reply with quote

Han de Bruijn wrote:
Quote:
Robert Low wrote:

This is *completely* standard stuff, Han: you might wise to
spend some time reading what has already been done, lest
you invest the same time reinventing a square wheel.

Uhm, it rolls (: I have an application).

Sure: the question is whether the way you're constructing
your conjunction and disjunction are appropriate. Maybe they
are for your particular application, because you're really
interested in probabilities: I don't know. But I do know
that for a lot of applications the fuzzy people find them
inappropriate because a probabilistic model is *not*
the best.

Quote:
Therefore my wheels are not
square.

Depends how well it rolls, no?

Quote:
And where can I find that it's *completely* standard stuff?

http://www.faqs.org/faqs/fuzzy-logic/part1/

Or you could google for 'fuzzy logic introduction', or read
any textbook on fuzzy logic. Surely you have access to
a technical library.
Back to top
Han de Bruijn
science forum Guru


Joined: 18 May 2005
Posts: 1285

PostPosted: Fri Jun 16, 2006 8:34 am    Post subject: Re: Fuzzy Booleans with Application Reply with quote

Robert Low wrote:

Quote:
This is *completely* standard stuff, Han: you might wise to
spend some time reading what has already been done, lest
you invest the same time reinventing a square wheel.

I've been "wise" and found something:

http://en.wikipedia.org/wiki/Fuzzy_set_operations

Implementing the "standard" fuzzy logic found there results in a version
of the program which works equally well as the original. Thanks, Robert!

Han de Bruijn
Back to top
Robert Low
science forum Guru


Joined: 01 May 2005
Posts: 1063

PostPosted: Fri Jun 16, 2006 8:46 am    Post subject: Re: Fuzzy Booleans with Application Reply with quote

Han de Bruijn wrote:
Quote:
Robert Low wrote:

This is *completely* standard stuff, Han: you might wise to
spend some time reading what has already been done, lest
you invest the same time reinventing a square wheel.

I've been "wise" and found something:

http://en.wikipedia.org/wiki/Fuzzy_set_operations

Implementing the "standard" fuzzy logic found there results in a version
of the program which works equally well as the original. Thanks, Robert!

So the obvious question becomes "When is probabilistic
better, and when is the standard version better? And why?"
But I'll leave that one for somebody else to ponder.

Meantime, here's a completely different 'algorithm' for solving
your 'spot the difference' puzzles.

Line up the pictures side-by-side, and look at them with your
eyes crossed: when you adjust the extent to which your eyes
are crossed just right, you see three images instead of four,
and the central one is the superposition of the two pictures.
Differences kind of 'jump out' at you then.
Back to top
Gordon Sande
science forum beginner


Joined: 11 May 2005
Posts: 48

PostPosted: Fri Jun 16, 2006 12:22 pm    Post subject: Re: Fuzzy Booleans with Application Reply with quote

On 2006-06-16 05:34:07 -0300, Han de Bruijn <Han.deBruijn@DTO.TUDelft.NL> said:

Quote:
Robert Low wrote:

This is *completely* standard stuff, Han: you might wise to
spend some time reading what has already been done, lest
you invest the same time reinventing a square wheel.

I've been "wise" and found something:

http://en.wikipedia.org/wiki/Fuzzy_set_operations

Implementing the "standard" fuzzy logic found there results in a version
of the program which works equally well as the original. Thanks, Robert!

Han de Bruijn

Sort of like the chapter in Numerical Recipes on Maximum Entropy fitting
where they use some alternate "entropy" functions without much change in
the fit. As they point out the "standard" MaxEnt comes with some truely
marvelous motivation (sizzle as they put it) but lots of other things also
work. Not an original observation but it is nicely presented.


P.S. & Warning. I do not much like NR for other reasons but this is an
example of something that they do well. Namely giving a readable, often
pithy, intoduction or survey.
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [12 Posts] View previous topic :: View next topic
The time now is Sat Jan 10, 2009 1:06 am | All times are GMT
Forum index » Science and Technology » Math
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts fuzzy multivariate zagatov num-analysis 0 Fri Jul 21, 2006 10:07 am
No new posts Fuzzy Inference System (FIS) Based De... amizo1@gmail.com Mechanics 0 Fri Jul 14, 2006 7:26 pm
No new posts EC-funded Research Visits: Applicatio... europa@epcc.ed.ac.uk Chem 0 Wed Jul 12, 2006 12:55 pm
No new posts EC-funded Research Visits: Applicatio... europa@epcc.ed.ac.uk Engineering 0 Wed Jul 12, 2006 12:55 pm
No new posts What happened to fuzzy set theory ediebur@rcn.com Math 7 Thu Jul 06, 2006 11:43 am

Debt Consolidation | Loans | Singapore Shopping Guide | Hummer | vShare YouTube Clone
Copyright © 2004-2005 DeniX Solutions SRL
Other DeniX Solutions sites: Electronics forum |  Medicine forum |  Unix/Linux blog |  Unix/Linux documentation |  Unix/Linux forums


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.7649s ][ Queries: 16 (0.6451s) ][ GZIP on - Debug on ]