473,405 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

In search of a good example.

Hi,

I am supposed to recommend a project using Binary Tress. I don't want
to use the same old school examples. I am wondering if anyone of you
can think of a real world example which uses Binary Tress. Need to be a
complex one.

Thanks

Jul 23 '05 #1
5 1287
co*******@gmail.com wrote:
Hi,

I am supposed to recommend a project using Binary Tress. I don't want
to use the same old school examples. I am wondering if anyone of you
can think of a real world example which uses Binary Tress. Need to be a
complex one.

Thanks


Database index file / table.
Given a key field of a record, locate the record as quickly
as possible. One could use a "Binary Tress" to associate
the key with the position of a record.

I don't know if this is a school example or not.

Hmm, is a binary truss the same as a binary tress?

--
Thomas Matthews
Jul 23 '05 #2
<co*******@gmail.com> wrote in message
news:11*********************@g14g2000cwa.googlegro ups.com...
I am supposed to recommend a project using Binary Tress.


How about the animal game?

Here's how it works: The machine asks you to think of an animal, and then
starts asking you yes/no questions about it. Eventually, it makes a guess
as to what the animal is, and you tell it whether it's right.

If it's wrong, it asks you: What question would you ask to distinguish your
animal from <whatever its guess was>?

You ask it a question, and tell it whether the answer should be yes or no.
After that, it will incorporate your question into the list of questions
that it asks next time.

It should be clear that the data structure to use for this game is a binary
tree, with a new leaf added each time there's a new animal.
Jul 23 '05 #3
> I am supposed to recommend a project using Binary Tress. I don't want
to use the same old school examples. I am wondering if anyone of you
can think of a real world example which uses Binary Tress. Need to be a
complex one.

An implementation of std::map?

cheers,
Marcin
Jul 23 '05 #4

<co*******@gmail.com> wrote in message
news:11*********************@g14g2000cwa.googlegro ups.com...
Hi,

I am supposed to recommend a project using Binary Tress. I don't want
to use the same old school examples. I am wondering if anyone of you
can think of a real world example which uses Binary Tress. Need to be a
complex one.

Thanks


A compression tree is pretty complex, but the tree starts balanced and ends
up pretty lopsided.

It only takes a small while to code, but longer to think out.

Dan
Jul 23 '05 #5
co*******@gmail.com wrote in
news:11*********************@g14g2000cwa.googlegro ups.com:
Hi,

I am supposed to recommend a project using Binary Tress. I don't want
to use the same old school examples. I am wondering if anyone of you
can think of a real world example which uses Binary Tress. Need to be a
complex one.

Thanks


How about counting the words in a text.

Each word occupies a tree node with a counter. The counter is incremented
for each repetition of the word.

At the end an alphabetic list of words and counters is printed.

Maybe this is too simple :(

Alan
Jul 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: disaia | last post by:
2 problems: Example: If a person types in a part number into Yahoo: 1. Is there a way for Yahoo to list your web site as one of the results. 2. If the user clicks on your link, can your web...
2
by: Zambo via SQLMonster.com | last post by:
Hi! We have Sql Server 2000 in our server (NT 4). Our database have now about +350.000 rows with information of images. Table have lot of columns including information about image name, keywords,...
83
by: D. Dante Lorenso | last post by:
Trying to use the 'search' in the docs section of PostgreSQL.org is extremely SLOW. Considering this is a website for a database and databases are supposed to be good for indexing content, I'd...
8
by: Steph | last post by:
Hi. I'm very new to MS Access and have been presented with an Access database of contacts by my employer. I am trying to redesign the main form of the database so that a button entitled...
5
by: pembed2003 | last post by:
Hi all, I need to write a function to search and replace part of a char* passed in to the function. I came up with the following: char* search_and_replace(char* source,char search,char*...
32
by: tshad | last post by:
Can you do a search for more that one string in another string? Something like: someString.IndexOf("something1","something2","something3",0) or would you have to do something like: if...
3
by: Liddle Feesh | last post by:
Hi, I have a table named "Person" in a MSDE (2000) database, and am building a search form comprising of search fields on the top section (forename, surname, telephonenumber, etc) which all...
3
by: Russell | last post by:
Hey, ok i have numerous tables to search through for a 'site search'. some of the searchble fields have html embeded within so after some quick referencing, saw I can use the regExp function...
3
by: Chung Leong | last post by:
Here's the rest of the tutorial I started earlier: Aside from text within a document, Indexing Service let you search on meta information stored in the files. For example, MusicArtist and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.