Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Calculate weight of word  (Read 9562 times)

0 Members and 1 Guest are viewing this topic.

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Calculate weight of word
« Reply #15 on: October 13, 2011, 12:21:25 PM »
Perhaps a quotation is needed here.
Quote
...
Since the dawn of computing, the sorting problem has attracted a great deal of research, perhaps due to the complexity of solving it efficiently despite its simple, familiar statement. For example, bubble sort was analyzed as early as 1956.[1] Although many consider it a solved problem, useful new sorting algorithms are still being invented (for example, library sort was first published in 2004). Sorting algorithms are prevalent in introductory computer science classes, where the abundance of algorithms for the problem provides a gentle introduction to a variety of core algorithm concepts, such as big O notation, divide and conquer algorithms, data structures, randomized algorithms, best, worst and average case analysis, time-space tradeoffs, and lower bounds. ...
http://en.wikipedia.org/wiki/Sorting_algorithm
Notice that the reference to Library Sort and the year 2004. Therefore seeking a better sort  is not over with.

Using of a hash, as BC said, results in collisions which have to be resolved later. Yet hash is commonly used because in the real world wight of objects is not evenly distributed. To give every different object an unique weight is a hard job. Yet if you know ahead of time how many objects that will ever be in a collection, you can give each item a unique position in a matrix. But if the number of  unique items is not set ahead of time, it can become difficult.

BTW. Of interest to Spanish speakers. The Spanish dictionary was officially modified to conform to the rules used in computer-generated word sorts.

Yo0u might want to compare lists in an old Spanish dictionary with a new one. If the Spanish had not done that... ??

Salmon Trout

  • Guest
Re: Calculate weight of word
« Reply #16 on: October 13, 2011, 12:27:20 PM »
But if the number of  unique items is not set ahead of time, it can become difficult.

Indeed. Thank you.