Calculating Multi-Party Swaps

hzane

New member
Joined
Jul 13, 2017
Messages
2
Hello, please set me in the right direction for solving multi-party swaps.

e.g.
Tom has cat wants dog
Sara has dog wants boat
Jon has boat wants cat

Solution:
Tom -[cat]-> Jon -[boat]->Sara-[dog]->Tom

But how do I express that for a much larger and complex data-set?

Here is another way to consider the data:
neo4jo.jpg

In programming to find all first level trade opportunities is trivial. But recursively finding all patterns through the data is a problem for me.

I hope to understand this better mathematically so any answers, concepts or advice is highly appreciated.
 
Hello, please set me in the right direction for solving multi-party swaps.

e.g.
Tom has cat wants dog
Sara has dog wants boat
Jon has boat wants cat

Solution:
Tom -[cat]-> Jon -[boat]->Sara-[dog]->Tom

But how do I express that for a much larger and complex data-set?

Here is another way to consider the data:
View attachment 8317

In programming to find all first level trade opportunities is trivial. But recursively finding all patterns through the data is a problem for me.

I hope to understand this better mathematically so any answers, concepts or advice is highly appreciated.
What topic in your statistics class generated this question? What tools have you been given for the study of this topic? (For instance, I would have thought that this topic would have arisen in a Graph Theory class, in the chapter on directed graphs.)

When you reply, please include a clear listing of your thoughts and efforts so far. Thank you! ;)
 
Last edited:
trade partay

Hi Stapel. My attempts so far are primitive. The graphic attached above is from a graphing database. Using the graphdb I thought to traverse all paths where alternating relationship (edge) types exist.

And in code I considered recursively crawling the data.
Let's say, starting from user A. find all items owned.

Imagine he owns two items - that's two paths: userA-owns->item1, userA-owns->item2

Then collect all users connected by "wants" to item1 or item2.

And repeat the process.

Keep cycling branches until either nobody wants the top item, in which case kill the branch.
Or the user that wants the current item is the original user. Which then is a good trade path.

What are your thought on that approach?

I got some direction by looking into into permutation groups.
https://www.quora.com/What-is-the-a...l-give-and-receive-something-How-to-find-them
 
Last edited:
Top