Skip to main content

Fuzzy Logic - Database, Queries and Quantification

Fuzzy Logic is an approach to computing based on "degrees of truth" rather than the usual "true or false" logic. It deals with reasoning that is approximate rather than precise to solve problems in a way that more resembles human logic, hence database querying process by the two valued realization of Boolean algebra is not adequate.

Fuzzy Scenario of Relations on Databases

The Fuzzy Scenario of Relations on Databases can be understood with the help of the following example −

Example

Suppose we have a database having the records of persons who visited India. In simple database, we will have the entries made in the following way −

NameAgeCitizenVisited CountryDays SpentYear of Visit
John Smith35U.S.India411999
John Smith35U.S.Italy721999
John Smith35U.S.Japan311999

Now, if anyone queries about the person who visited India and Japan in the year 99 and is the citizen of US, then the output will show two entries having the name of John Smith. This is simple query generating simple output.

But what if we want to know whether the person in the above query is young or not. According to the above result, the age of the person is 35 years. But can we assume the person to be young or not? Similarly, same thing can be applied on the other fields like days spent, year of visit, etc.

The solution of the above issues can be found with the help of Fuzzy Value sets as follows −

  • FV(Age){ very young, young, somewhat old, old }

  • FV(Days Spent){ barely few days, few days, quite a few days, many days }

  • FV(Year of Visit){distant past, recent past, recent }

  • Now if any query will have the fuzzy value then the result will also be fuzzy in nature.

Fuzzy Query System

A fuzzy query system is an interface to users to get information from the database using (quasi) natural language sentences. Many fuzzy query implementations have been proposed, resulting in slightly different languages. Although there are some variations according to the particularities of different implementations, the answer to a fuzzy query sentence is generally a list of records, ranked by the degree of matching.

Quantification

In modeling natural language statements, quantified statements play an important role. It means that NL heavily depends on quantifying construction which often includes fuzzy concepts like “almost all”, “many”, etc. Following are a few examples of quantifying propositions −

  • Every student passed the exam.
  • Every sport car is expensive.
  • Many students passed the exam.
  • Many sports cars are expensive.

In the above examples, the quantifiers “Every” and “Many” are applied to the crisp restrictions “students” as well as crisp scope “(person who)passed the exam” and “cars” as well as crisp scope ”sports”.

Fuzzy Events, Fuzzy Means and Fuzzy Variances

With the help of an example, we can understand the above concepts. Let us assume that we are a shareholder of a company named ABC. And at present the company is selling each of its share for ₹40. There are three different companies whose business is similar to ABC but these are offering their shares at different rates - ₹100 a share, ₹85 a share and ₹60 a share respectively.

Now the probability distribution of this price takeover is as follows −

Price₹100₹85₹60
Probability0.30.50.2

Now, from the standard probability theory, the above distribution gives a mean of expected price as below −

100×0.3+85×0.5+60×0.2=84.5

And, from the standard probability theory, the above distribution gives a variance of expected price as below −

(10084.5)2×0.3+(8584.5)2×0.5+(6084.5)2×0.2=124.825

Suppose the degree of membership of 100 in this set is 0.7, that of 85 is 1, and the degree of membership is 0.5 for the value 60. These can be reflected in the following fuzzy set −

{0.7100,185,0.560,}

The fuzzy set obtained in this manner is called a fuzzy event.

We want the probability of the fuzzy event for which our calculation gives −

0.7×0.3+1×0.5+0.5×0.2=0.21+0.5+0.1=0.81

Now, we need to calculate the fuzzy mean and the fuzzy variance, the calculation is as follows −

Fuzzy_mean =(10.81)×(100×0.7×0.3+85×1×0.5+60×0.5×0.2)

=85.8

Fuzzy_Variance 



Anurag Rana

Comments

Popular posts from this blog

Standard and Formatted Input / Output in C++

The C++ standard libraries provide an extensive set of input/output capabilities which we will see in subsequent chapters. This chapter will discuss very basic and most common I/O operations required for C++ programming. C++ I/O occurs in streams, which are sequences of bytes. If bytes flow from a device like a keyboard, a disk drive, or a network connection etc. to main memory, this is called   input operation   and if bytes flow from main memory to a device like a display screen, a printer, a disk drive, or a network connection, etc., this is called   output operation . Standard Input and Output in C++ is done through the use of  streams . Streams are generic places to send or receive data. In C++, I/O is done through classes and objects defined in the header file  <iostream> .  iostream  stands for standard input-output stream. This header file contains definitions to objects like  cin ,  cout , etc. /O Library Header Files There are...

locking

DBMS Locking Part I (DBMS only) TECHNICAL ARTICLES -> PERFORMANCE ARTICLES [  Back  ] [  Next  ] DBMS is often criticized for excessive locking – resulting in poor database performance when sharing data among multiple concurrent processes. Is this criticism justified, or is DBMS being unfairly blamed for application design and implementation shortfalls? To evaluate this question, we need to understand more about DBMS locking protocols. In this article, we examine how, why, what and when DBMS locks and unlocks database resources. Future articles will address how to minimize the impact of database locking. THE NEED FOR LOCKING In an ideal concurrent environment, many processes can simultaneously access data in a DBMS database, each having the appearance that they have exclusive access to the database. In practice, this environment is closely approximated by careful use of locking protocols. Locking is necessary in a concurrent environment to as...

DATA WAREHOUSE VERSUS DATA MART: THE GREAT DEBATE

DATA WAREHOUSE VERSUS DATA MART: THE GREAT DEBATE Customers exploring the field of business intelligence for the first time often lead with: What is the difference between a data warehouse and a data mart? The next question follows as predictably as night follows day: which one does my company need? Let me start by saying that the two terms are often confused. Indeed, some people in the industry use them virtually interchangeably, which is unfortunate, because they do reflect a valuable hierarchical difference. The Data Warehouse A "data warehouse" will typically contain the full range of business intelligence available to a company from all sources. That data consists of transaction-processing records, corporate and marketing data, and other business operations information; for example, a bank might include loans, credit card statements, and demand deposits data, along with basic customer information. This internal data is frequently combined with statistica...