My Math Forum  

Go Back   My Math Forum > College Math Forum > Applied Math

Applied Math Applied Math Forum

LinkBack Thread Tools Display Modes
July 27th, 2017, 01:39 AM   #1
Joined: Jul 2017
From: Cagliari

Posts: 1
Thanks: 0

Generating a linear system for popularity calculation

This is a half mathematical half computer science question. I am working on matlab on a mathematical problem.
I want to generate a linear system for the calculation of popularity of people (a vector $\displaystyle x$) in a generic social network, given a simple matrix of friendship $\displaystyle F$. If user 1 and user 2 are friends, $\displaystyle F(1,2)=1$ but also $\displaystyle F(2,1)=1$ (the friendship is bidirectional). To transform this problem in a linear system I need that the popularity value of a person ($\displaystyle x(i)$) and the popularity of all his friends ($\displaystyle ∀x(j) | F(i,j)=1 and j≠i$) are linearly dependent. So I wrote this simple formula

$\displaystyle x(j) = sum(x(i) x n(i) x F(i,j)) ∀i≠j$
where $\displaystyle n(i)$ is the number of friends of i.

For $\displaystyle size(x)=3$ the system is something like this

    -x(1) + f(1,2) n(2) x(2) + f(1,3) n(3) = 0 
    f(2,1) n(1) x(1) - x(2) + f(1,3) n(3) x(3) = 0 
    f(3,1) n(1) x(1) + f(1,2) n(2) x(2) - x(3) = 0
With this specific formula, there are two problems:
  1. With no constant term, the solution found is $\displaystyle x(i)=0 ∀i$
  1. I need positive values of popularity, but this approach gave also some negative (and correct!) results.

So I need a formula that doesn't have these two problems. The formula can be chosen arbitrarily because the problem is totally defined by me. It must take account of friendship relations and number of friends in a linear combination (necessary to get a linear system), but also be positive.
Here the code of the generation and resolution of the system

    for i=1:n

Last edited by skipjack; July 27th, 2017 at 07:38 AM.
ela92 is offline  

  My Math Forum > College Math Forum > Applied Math

calculation, generating, linear, linear system equations, popularity, problem generation, system

Thread Tools
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Linear approximation of Non linear system by Taylor series RGNIT Calculus 0 March 20th, 2014 11:21 PM
Popularity or agreeance of relations 667 Applied Math 1 January 24th, 2014 08:31 AM
Hamiltonian system, plotting and energy calculation ihavenoidea Applied Math 0 June 8th, 2013 09:20 AM
Solve nonlinear system (=linear+linear systems) tools Linear Algebra 1 September 21st, 2012 12:38 PM
Popularity SidT New Users 1 June 27th, 2008 12:48 PM

Copyright © 2017 My Math Forum. All rights reserved.