Giter Club home page Giter Club logo

complex_search_algorithms's Introduction


Abir Abbas 0955448 CIS2750 - Assignment 2 2018-02-02 [email protected]



Compilation


make


Running the program(s)


./A3


Question 2.4


The average ratio was calculated using the data under the "output" section of this README

average ratio for brute force : 48904760 shifts/s

average ratio for horsepool : 52554058 shifts/s

analysis : They both have a very similar shifts/s ratio, which is most likely due to the fact that the algorithms for the most part uses the same comparisons and functions to actually figure out whether the search pattern matches or not. The key difference between the two aglorithm is the number of total shifts, so even tho they have the same shifts/s ratio, they will likely have different amount of shifts and computing times. as a result both will have a worst case time of O(mn) because both have the same shifts/s ratio but the average case will differ.


output


Word : outcome Total strings found : 20 Total pattern switches : 3036227 Total time taken : 0.064741 seconds

Word : the Total strings found : 28338 Total pattern switches : 3212415 Total time taken : 0.070274 seconds

Word : potato Total strings found : 0 Total pattern switches : 3080274 Total time taken : 0.063161 seconds

Word : test Total strings found : 253 Total pattern switches : 3168368 Total time taken : 0.066411 seconds

Word : dinosaur Total strings found : 0 Total pattern switches : 2992180 Total time taken : 0.060859 seconds

Word : dictionary Total strings found : 0 Total pattern switches : 2904086 Total time taken : 0.057531 seconds

Word : to Total strings found : 15252 Total pattern switches : 3256464 Total time taken : 0.067872 seconds

Word : I Total strings found : 6168 Total pattern switches : 3300512 Total time taken : 0.063863 seconds

Word : communication Total strings found : 33 Total pattern switches : 2771945 Total time taken : 0.055776 seconds

Word : money Total strings found : 2 Total pattern switches : 3124321 Total time taken : 0.061313 seconds

************* HORSEPOOL ************

Word : outcome Total strings found : 20 Total pattern switches : 490397 Total time taken : 0.010929 seconds

Word : the Total strings found : 28338 Total pattern switches : 1049208 Total time taken : 0.019851 seconds

Word : potato Total strings found : 0 Total pattern switches : 586477 Total time taken : 0.011170 seconds

Word : test Total strings found : 253 Total pattern switches : 853860 Total time taken : 0.016284 seconds

Word : dinosaur Total strings found : 0 Total pattern switches : 466418 Total time taken : 0.009309 seconds

Word : dictionary Total strings found : 0 Total pattern switches : 403625 Total time taken : 0.008414 seconds

Word : to Total strings found : 15252 Total pattern switches : 1521719 Total time taken : 0.024499 seconds

Word : I Total strings found : 6168 Total pattern switches : 2706912 Total time taken : 0.040871 seconds

Word : communication Total strings found : 33 Total pattern switches : 318048 Total time taken : 0.007905 seconds

Word : money Total strings found : 2 Total pattern switches : 697834 Total time taken : 0.012412 seconds

complex_search_algorithms's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.