[algogeeks] Re: Inversion problem

2012-07-07 Thread deepikaanand
http://www.geeksforgeeks.org/archives/3968


On Jul 8, 11:01 am, Navin Kumar  wrote:
> Let A[n] be an array of n distinct number. If i A[j] then the
> pair (i , j) is called inversion of A.
>
> Give an algorithm that determines the total number of inversions in
> O(nlogn) time.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Inversion problem

2012-07-07 Thread Navin Kumar
Let A[n] be an array of n distinct number. If i A[j] then the 
pair (i , j) is called inversion of A.

Give an algorithm that determines the total number of inversions in 
O(nlogn) time.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/o7L4RLyUMuQJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Secure computation of Intersection of two sets

2012-07-07 Thread Sairam
How do you find the intersection of two sets in a secured way? 
Which means imagine a situation where there is a client  who has got a set 
S1={1,2,3}, and there is a  server who has got a set S2[{2,3}. Client wants 
to find the count of intersection which is |S1 intersection S2| = 2. But, 
it doesn't want to give the set S1 directly to the server? How should the 
client give the set S1, such that server computes the intersection of S1 
and S2 and gives the count to client.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/xKZu8tmT8QEJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] flipkart question

2012-07-07 Thread Abhishek Sharma
@Raj: trace karke dekh na yaar when u have 3 0s and 3 6s.. the sum
distribution would look like this:

given below are the possibilities:

Combination of 1,2,3,4,5,6 with 0
1+0 = 1
2+0 = 2
3+0 = 3

OR

4+0 = 4
5+0 = 5
6+0 = 6

Combination of 1,2,3,4,5,6 with 6

1+6 = 7
2+6 = 8
3+6 = 9

OR

4+6 = 10
5+6 = 11
6+6 = 12

ho gye na evenly distribute :)

On Sat, Jul 7, 2012 at 10:24 PM, Prakhar Jain  wrote:

> Label 3 of the faces with 0 and other 3 faces with 6.
>
>
> --
> Prakhar Jain
> IIIT Allahabad
> B.Tech IT 3rd Year
> Mob no: +91 9454992196
> E-mail: rit2009...@iiita.ac.in
>   jprakha...@gmail.com
>
>
>
> On Sat, Jul 7, 2012 at 12:52 AM, Hraday Sharma wrote:
>
>> You are given 2 dice. Both are fair. One of the dice has no numbers
>> printed on it. You have to label the unmarked dice such that when both the
>> dice are thrown, the sum on the faces is evenly distributed between 1 and 12
>>  .
>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/algogeeks/-/uXBWN7DSu_gJ.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] flipkart question

2012-07-07 Thread Prakhar Jain
Label 3 of the faces with 0 and other 3 faces with 6.


-- 
Prakhar Jain
IIIT Allahabad
B.Tech IT 3rd Year
Mob no: +91 9454992196
E-mail: rit2009...@iiita.ac.in
  jprakha...@gmail.com



On Sat, Jul 7, 2012 at 12:52 AM, Hraday Sharma wrote:

> You are given 2 dice. Both are fair. One of the dice has no numbers
> printed on it. You have to label the unmarked dice such that when both the
> dice are thrown, the sum on the faces is evenly distributed between 1 and 12
>  .
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/algogeeks/-/uXBWN7DSu_gJ.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Help about compile in LISP

2012-07-07 Thread Victor Manuel Grijalva Altamirano
I understand the idea of backtracking(eight queen it´s the classsic
problem), i´m programmer of C,C++, JAVA,...
I'm learning LISP, i know a bit about funtions, operators, etc...

I want compile the code and throw me the solution, but i have problem to do
that!!!


2012/7/7 Abhishek Sharma 

> whats your purpose behind that ??
>
> a) u want to understand the algorithm ? then go through backtracking and
> then try to solve the problem
> b) u want to learn LISP ?? then this is not the right place... u may want
> to go through LIPS tutorials and then have a look at at this problem again
>
>
> On Sun, Jul 8, 2012 at 12:15 AM, Victor Manuel Grijalva Altamirano <
> kavic1.mar...@gmail.com> wrote:
>
>> The next code, it's about the problem Eight Queens, i found it in
>> internet, but i'm new in LISP and i don´t know how to compile it...
>> Can you help me?
>>
>> (defun find-queen (arr p d)
>>   (destructuring-bind ((px py) (dx dy)) (list p d)
>> (do ((x px (+ x dx))
>>  (y py (+ y dy)))
>> ((not (array-in-bounds-p arr x y)))
>>   (when (= (aref arr x y) 1) (return t)
>>
>> (defun queen-in-row (board row)
>>   (find-queen board (list row 0) '(0 1)))
>>
>> (defun queen-in-col (board col)
>>   (find-queen board (list 0 col) '(1 0) ))
>>
>> (defun queen-in-diags (board x y)
>>   (member t (mapcar (lambda (p)
>> (find-queen board (list x y) p))
>>   '((1 1) (-1 -1) (1 -1) (-1 1)
>>
>> (defun queen-in-range (board x y)
>>   (or (queen-in-row board x)
>>   (queen-in-col board y)
>>   (queen-in-diags board x y)))
>>
>> (defun backtracking (pred explore node)
>>   (if (funcall pred node) (list node)
>> (mapcan (lambda (n) (backtracking pred explore n))
>> (funcall explore node
>>
>> (defun count-queens (board)
>>   (loop for i below (array-total-size board)
>> for box = (row-major-aref board i)
>> count (> box 0)))
>>
>> (defun solutionp (board)
>>   (and board (= 8 (count-queens board
>>
>> (defun put-queens (board)
>>   (loop for i below 8
>> when (not (queen-in-row board i))
>> return
>> (loop for j below 8
>>   for b = (copy-array board)
>>   when (not (queen-in-range board i j))
>>do (setf (aref b i j) 1)
>>and collect b)))
>>
>> (defun 8-queens ()
>>   (backtracking #'solutionp #'put-queens board))
>>
>> (defvar board (make-array '(8 8) :initial-element 0))
>>
>>
>> --
>> Victor Manuel Grijalva Altamirano
>> Universidad Tecnologica de La Mixteca
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Victor Manuel Grijalva Altamirano
Universidad Tecnologica de La Mixteca

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Help about compile in LISP

2012-07-07 Thread Abhishek Sharma
whats your purpose behind that ??

a) u want to understand the algorithm ? then go through backtracking and
then try to solve the problem
b) u want to learn LISP ?? then this is not the right place... u may want
to go through LIPS tutorials and then have a look at at this problem again


On Sun, Jul 8, 2012 at 12:15 AM, Victor Manuel Grijalva Altamirano <
kavic1.mar...@gmail.com> wrote:

> The next code, it's about the problem Eight Queens, i found it in
> internet, but i'm new in LISP and i don´t know how to compile it...
> Can you help me?
>
> (defun find-queen (arr p d)
>   (destructuring-bind ((px py) (dx dy)) (list p d)
> (do ((x px (+ x dx))
>  (y py (+ y dy)))
> ((not (array-in-bounds-p arr x y)))
>   (when (= (aref arr x y) 1) (return t)
>
> (defun queen-in-row (board row)
>   (find-queen board (list row 0) '(0 1)))
>
> (defun queen-in-col (board col)
>   (find-queen board (list 0 col) '(1 0) ))
>
> (defun queen-in-diags (board x y)
>   (member t (mapcar (lambda (p)
> (find-queen board (list x y) p))
>   '((1 1) (-1 -1) (1 -1) (-1 1)
>
> (defun queen-in-range (board x y)
>   (or (queen-in-row board x)
>   (queen-in-col board y)
>   (queen-in-diags board x y)))
>
> (defun backtracking (pred explore node)
>   (if (funcall pred node) (list node)
> (mapcan (lambda (n) (backtracking pred explore n))
> (funcall explore node
>
> (defun count-queens (board)
>   (loop for i below (array-total-size board)
> for box = (row-major-aref board i)
> count (> box 0)))
>
> (defun solutionp (board)
>   (and board (= 8 (count-queens board
>
> (defun put-queens (board)
>   (loop for i below 8
> when (not (queen-in-row board i))
> return
> (loop for j below 8
>   for b = (copy-array board)
>   when (not (queen-in-range board i j))
>do (setf (aref b i j) 1)
>and collect b)))
>
> (defun 8-queens ()
>   (backtracking #'solutionp #'put-queens board))
>
> (defvar board (make-array '(8 8) :initial-element 0))
>
>
> --
> Victor Manuel Grijalva Altamirano
> Universidad Tecnologica de La Mixteca
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Help about compile in LISP

2012-07-07 Thread Victor Manuel Grijalva Altamirano
The next code, it's about the problem Eight Queens, i found it in internet,
but i'm new in LISP and i don´t know how to compile it...
Can you help me?

(defun find-queen (arr p d)
  (destructuring-bind ((px py) (dx dy)) (list p d)
(do ((x px (+ x dx))
 (y py (+ y dy)))
((not (array-in-bounds-p arr x y)))
  (when (= (aref arr x y) 1) (return t)

(defun queen-in-row (board row)
  (find-queen board (list row 0) '(0 1)))

(defun queen-in-col (board col)
  (find-queen board (list 0 col) '(1 0) ))

(defun queen-in-diags (board x y)
  (member t (mapcar (lambda (p)
(find-queen board (list x y) p))
  '((1 1) (-1 -1) (1 -1) (-1 1)

(defun queen-in-range (board x y)
  (or (queen-in-row board x)
  (queen-in-col board y)
  (queen-in-diags board x y)))

(defun backtracking (pred explore node)
  (if (funcall pred node) (list node)
(mapcan (lambda (n) (backtracking pred explore n))
(funcall explore node

(defun count-queens (board)
  (loop for i below (array-total-size board)
for box = (row-major-aref board i)
count (> box 0)))

(defun solutionp (board)
  (and board (= 8 (count-queens board

(defun put-queens (board)
  (loop for i below 8
when (not (queen-in-row board i))
return
(loop for j below 8
  for b = (copy-array board)
  when (not (queen-in-range board i j))
   do (setf (aref b i j) 1)
   and collect b)))

(defun 8-queens ()
  (backtracking #'solutionp #'put-queens board))

(defvar board (make-array '(8 8) :initial-element 0))


-- 
Victor Manuel Grijalva Altamirano
Universidad Tecnologica de La Mixteca

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] flipkart question

2012-07-07 Thread Raj Asati
plz explain ur ans .how it is calculated?

On Sat, Jul 7, 2012 at 12:54 PM, Amol Sharma  wrote:

> Three 0's and Three 6's.
>
> 36 possibilities and 12 possible values of sum, so each sum should come in
> 3 possibilities and hence three 0's and three 6's.
> --
>
>
> Amol Sharma
> Final Year Student
> Computer Science and Engineering
> MNNIT Allahabad
>
>  
> 
>
>
>
>
>
>
> On Sat, Jul 7, 2012 at 12:52 AM, Hraday Sharma wrote:
>
>> You are given 2 dice. Both are fair. One of the dice has no numbers
>> printed on it. You have to label the unmarked dice such that when both the
>> dice are thrown, the sum on the faces is evenly distributed between 1 and 12
>>  .
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] flipkart question

2012-07-07 Thread Amol Sharma
Three 0's and Three 6's.

36 possibilities and 12 possible values of sum, so each sum should come in
3 possibilities and hence three 0's and three 6's.
--


Amol Sharma
Final Year Student
Computer Science and Engineering
MNNIT Allahabad









On Sat, Jul 7, 2012 at 12:52 AM, Hraday Sharma wrote:

> You are given 2 dice. Both are fair. One of the dice has no numbers
> printed on it. You have to label the unmarked dice such that when both the
> dice are thrown, the sum on the faces is evenly distributed between 1 and 12
>  .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] flipkart question

2012-07-07 Thread Hraday Sharma
You are given 2 dice. Both are fair. One of the dice has no numbers printed 
on it. You have to label the unmarked dice such that when both the dice are 
thrown, the sum on the faces is evenly distributed between 1 and 12 .


-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/uXBWN7DSu_gJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] MS Design Ques

2012-07-07 Thread Anshu Mishra
Best will be storing BIG_INT in array of integers.

int [] val; //store actual number
int size; // required length of val array.

take the string as input for constructors and convert it into 2's
complement form, maintaining little endian order or big endian order.
Perform other operation keeping order in mind.



On Sat, Jul 7, 2012 at 5:23 PM, sravanreddy001 wrote:

> i was thinking of character array. which is same as string.
> Any thoughts on better alternatives?
>
>
> On Friday, 6 July 2012 13:34:01 UTC-4, anshu wrote:
>>
>> yes, We can have much better data structure for storing big integer
>> instead of string just for simplicity I have taken string.
>>
>> On Fri, Jul 6, 2012 at 11:11 AM, Mithun Kumar wrote:
>>
>>> @anshuman...
>>>
>>> Are you converting numbers to string because data types ranges
>>> and precision differs? or is there any other reason?
>>>
>>> -mithun
>>>
>>> On Fri, Jul 6, 2012 at 12:58 AM, payal gupta wrote:
>>>
 thnx...4 d rply..

 Regards,
 PAYAL GUPTA,
 NIT-B.


 On Fri, Jul 6, 2012 at 12:43 AM, Anshu Mishra <
 anshumishra6...@gmail.com> wrote:

> First define all the basic operation you can apply on two numbers.
>
> Binary operation : +, -, *, /, %, optional(&(and), |(or), ^(xor))
> Unary operation : !, ~, -
> Comparison : <, > ==, !=
>
> Define all these operation.
>
> Most simplest one can be,
> class BIG_INT {
>private string val;
>//Define constructor
>private BIG_INT(){}
>public BIG_INT(int x) {
>this.val = x.toString();
>}
>public BIG_INT(long x) {
>this.val = x.toString();
>}
>public BIG_INT(string x) {
>this.val = x;
>}
>public BIG_INT add(BIG_INT x);
>public BIG_INT add(int x);
>public BIG_INT add(long x);
>
>   similarly write methods for other operation also;
>
>   }
>
> If this question asked for only design testing purpose only all method
> declaration will be sufficient.
>
> --
> Anshuman Mishra | Software Development Engineer | Amazon
>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to algogeeks+unsubscribe@**
> googlegroups.com .
> For more options, visit this group at http://groups.google.com/**
> group/algogeeks?hl=en 
> .
>

  --
 You received this message because you are subscribed to the Google
 Groups "Algorithm Geeks" group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to algogeeks+unsubscribe@**
 googlegroups.com .
 For more options, visit this group at http://groups.google.com/**
 group/algogeeks?hl=en .

>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Algorithm Geeks" group.
>>> To post to this group, send email to algogeeks@googlegroups.com.
>>> To unsubscribe from this group, send email to algogeeks+unsubscribe@**
>>> googlegroups.com .
>>> For more options, visit this group at http://groups.google.com/**
>>> group/algogeeks?hl=en .
>>>
>>
>>
>>
>> --
>> Anshuman Mishra | Software Development Engineer | Amazon
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/algogeeks/-/pkUNaazktKAJ.
>
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Anshuman Mishra | Software Development Engineer | Amazon

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] MS Design Ques

2012-07-07 Thread sravanreddy001
i was thinking of character array. which is same as string.
Any thoughts on better alternatives?

On Friday, 6 July 2012 13:34:01 UTC-4, anshu wrote:
>
> yes, We can have much better data structure for storing big integer 
> instead of string just for simplicity I have taken string.
>
> On Fri, Jul 6, 2012 at 11:11 AM, Mithun Kumar wrote:
>
>> @anshuman...
>>
>> Are you converting numbers to string because data types ranges 
>> and precision differs? or is there any other reason?
>>
>> -mithun 
>>
>> On Fri, Jul 6, 2012 at 12:58 AM, payal gupta  wrote:
>>
>>> thnx...4 d rply..
>>>
>>> Regards,
>>> PAYAL GUPTA,
>>> NIT-B.
>>>
>>>
>>> On Fri, Jul 6, 2012 at 12:43 AM, Anshu Mishra >> > wrote:
>>>
 First define all the basic operation you can apply on two numbers.

 Binary operation : +, -, *, /, %, optional(&(and), |(or), ^(xor))
 Unary operation : !, ~, -
 Comparison : <, > ==, != 

 Define all these operation.

 Most simplest one can be,
 class BIG_INT {
private string val;
//Define constructor
private BIG_INT(){}
public BIG_INT(int x) {
this.val = x.toString();
}
public BIG_INT(long x) {
this.val = x.toString();
}
public BIG_INT(string x) {
this.val = x;
}
public BIG_INT add(BIG_INT x);
public BIG_INT add(int x);
public BIG_INT add(long x);

   similarly write methods for other operation also;

   }

 If this question asked for only design testing purpose only all method 
 declaration will be sufficient.

 -- 
 Anshuman Mishra | Software Development Engineer | Amazon


  -- 
 You received this message because you are subscribed to the Google 
 Groups "Algorithm Geeks" group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to 
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/algogeeks?hl=en.

>>>
>>>  -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Algorithm Geeks" group.
>>> To post to this group, send email to algogeeks@googlegroups.com.
>>> To unsubscribe from this group, send email to 
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at 
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>
>
> -- 
> Anshuman Mishra | Software Development Engineer | Amazon
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/pkUNaazktKAJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Most compatible people

2012-07-07 Thread Akshat Sapra
This is the simple pattern finding problem in which we have to find the
most frequent patterns of persons that listens/vote for the same band.
Here we can apply the frequent pattern algorithm like FP Tree or Apriori
algorithm. Link for the tutorial of FP tree is given below

fptree.pdf


Here we have to first convert the choices of the particular person as a
hashmap>,
the key here is the band and the set of strings contains the name of
persons who voted for the band.
Next step is to create the FP tree from the given set of people for
particular band and create the FP tree as per given in the tutorial and
find the frequent patterns.

-- 


Akshat Sapra
Under Graduation(B.Tech)
IIIT-Allahabad(Amethi Campus)
*--*
sapraaks...@gmail.com
akshatsapr...@gmail.com
rit20009008@ iiita.ac.in

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.