Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to let an average user design a boolean expression graphically [closed]

In our application there's a list of customers, and a list of keywords (among other things). Each customer can have a number of keywords, but it's not mandatory. So for instance, one customer can have the keywords "retail" and "chain", one can have only "contractor" and a third can have none at all.

I want to let the user make a selection of customers based on these keywords, but not having to write (retail AND chain) or contractor and not wholesale

I would like to make it as user-friendly as possible, and ideally with only "simple" controls, like checkboxes, comboboxes etc.

Does anyone have any suggestions on how to design this? Or maybe some examples of applications where there is a similar functionality?

like image 429
Svein Bringsli Avatar asked Mar 17 '10 20:03

Svein Bringsli


People also ask

What are the 4 methods to reduce a Boolean expression?

There are a number of methods for simplifying Boolean expressions: algebraic, Karnaugh maps, and Quine-McCluskey being the more popular.

How do you minimize Boolean expressions?

There are two methods that help us in the reduction of a given Boolean Function. These are the algebraic manipulation method, which is longer, and the K-map method, which is shorter.

How will you represent on and off in Boolean values?

When you are supplying a Boolean value, you can type either YES , ON , or TRUE for a true value, and NO , OFF , or FALSE for a false value.

Can Boolean functions be simplified by graphical methods?

The K-map is a graphical method that provides a systematic method for simplifying and manipulating the Boolean expressions or to convert a truth table to its corresponding logic circuit in a simple, orderly process.


2 Answers

Maybe the simplest UI would be something like:

Find customers with

All of these            Any of these          None of these
[] retail               [] retail             [] retail
[] chain                [] chain              [] chain
[] contractor           [] contractor         [] contractor
[] wholesale            [] wholesale          [] wholesale
like image 100
Jacob Mattison Avatar answered Jun 07 '23 09:06

Jacob Mattison


End-users have serious trouble with complex boolean constructions. There have been a number of studies of this (AND is pretty easy for them to understand, but OR is hard). Provide your end-users with access to a general-purpose boolean expression generator and you're jumping down a rabbit hole with no end.

  • JacobM's solution is a nice simplification.
  • One system that I've used in the past is to have search refinement: only allow maybe one or two decisions for the first search, then allow end-users to whittle down the results with a series of single decisions ("just show contractors", "not retail", etc.) For this to work well you usually need an easy way for them to maintain recent searches, either through a tabbed window list or something else.
  • Think carefully about your end-users. Do they really need a complete boolean search generator? What is the actual data that they want? Does accessing that data require searches no more complex than some arbitrary limit? If so, design your UI to support just up to that limit. JacobM's solution is an example of this to some degree.
like image 31
Ender Avatar answered Jun 07 '23 08:06

Ender