Блог пользователя d4rkc0de

Автор d4rkc0de, история, 9 лет назад, По-английски

Hi Cfs

I have a project at school , the purpose of it is to create a game based on Min-Max or Alpha–beta_pruning algorithm.

I don't have difficulty implementing the algorithm but i'm out of idea about the subject of the game .

Can any body give some ideas or links about a simple and original implementation of a game that use this algorithm .

Also what is the best c++ libraries that can help to create an gui interface to the game , i heard about QT is it good ?

Thanks in advance.

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор d4rkc0de, история, 9 лет назад, По-английски

Hello CF's . I was trying to find some optimizations to the this problem

So we have n strings , we are trying to find all rare subset of letters of theses strings.

a rares subset is a subset of letters x of a string s, such that the number of appearances of x in all strings is strictly lower than a number min_appear.

example :

let's say we have 3 strings and min_appear = 2

abcd abc cde

than the answer is e,ad,bd,ce,de,abc,abd,bcd,abcd,cde (because the number of their appearances = 1 < 2)

these are all the possible subset of letters and their number of appearances { a=2 ,b=2 ,c=3 ,d=2 ,e=1 ,ab=2 ,ac=2 ,ad=1 ,bc=2 ,bd=1 ,cd=2 ,ce=1 ,de=1 ,abc=2 ,abd=1,bcd=1,abcd=1,cde=1}

The best solution i come with have a n*2^(length of taller string) , i'm wondering if there is a solution with a better complexity.

UDP : Sorry i forgot about subsets of length 3 and 4 . also each two different letters from each string are distinct.

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится