5. .....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
.....
.
....
.
....
.
Wellness Profile Model (WPM)
The Wellness Profile Model (WPM) is a mathematical
model which ties together social networking, wellness, and
complexity theory.
The original model was proposed by R. Greenlaw in 2010 with the
aim of leveraging the popularity of social networking to help
improve people’s wellness.
The basic idea behind the model is to create groups of members
with some matching constraints according to their provided
information in real time.
Nopadon Juneam (Chiang Mai University) ECTI-CON 2014 May 16, 2014 5 / 31
9. .....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
.....
.
....
.
....
.
Instance of the WPM
1. Members are M = {m1, m2, m3, m4, m5, m6}.
2. Characteristics are C = {c1, c2, c3, c4} with
Γ(c1) = Γ(c2) = Γ(c3) = Γ(c4) = {0, 1}. The same linear order is
given by 0 < 1, where 0 indicates “not important” and 1 indicates
“important”. Here c1, c2, c3, and c4 are competing against others,
having fun, losing weight, and reducing stress, respectively.
3. Preferences on characteristics are P = {(1, 1, 0, 0),
(0, 1, 0, 1), (0, 0, 1, 1), (1, 1, 0, 0), (1, 1, 0, 0), (0, 1, 0, 1)}.
4. Intervals of the number of desired partners are
I = {[1, 3], [2, 3], [1, 3], [1, 3], [2, 5], [2, 5]}.
Nopadon Juneam (Chiang Mai University) ECTI-CON 2014 May 16, 2014 9 / 31
10. .....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
.....
.
....
.
....
.
Instance of the WPM (cont.)
5. Activities are A = {a1, a2, a3, a4} with A1 = {a1, a3, a4},
A2 = {a2, a3}, A3 = {a1, a3, a4}, A4 = {a2, a3, a4}, A5 = {a2},
A6 = {a2, a3}. Here a1, a2, a3, and a4 are cycling, dancing, running,
and swimming, respectively.
6. Available times using the 24-hour clock system are
T = {{[7, 8], [16, 17]}, {[6, 7], [18, 19]}, {[10, 11], [18, 19]}, {[6, 7],
[16, 17]}, {[8, 9], [16, 17]}, {[8, 9], [18, 19]}}.
7. Vital statistics are S = {s1, s2} with ζ(s1) = {x ∈ R | 18.5 ≤ x < 35}
and ζ(s2) = {x ∈ R | 49 ≤ x < 82}. Here s1 is the body mass index
(BMI) and s2 is the resting heart rate (HRrest).
8. Members’ vital statistics are V = {(21, 72), (25, 80), (34, 95),
(20, 70), (20, 73), (27, 77)}.
Nopadon Juneam (Chiang Mai University) ECTI-CON 2014 May 16, 2014 10 / 31
11. .....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
.....
.
....
.
....
.
Interpretation
Domain m1’s wellness profile
Members m1 ∈ M
Characteristics C = {c1, c2, c3, c4}
Preferences (1, 1, 0, 0) ∈ P
Interval [1, 3] ∈ I
Activities A1 = {a1, a3, a4}
Available times {[7, 8], [16, 17]} ∈ T
Vital statistics S = {s1, s2}
Members’ vital statistics (21, 72) ∈ V
.
Interpretation
..
......
Member m1 is interested in competing against others (c1) and having fun
(c2). He would like 1 to 3 partners for cycling (a1), running (a3), and
swimming (a4). His available times are at 7-8 AM and 4-5 PM. He has a
BMI (s1)of 21 and a HRrest (s2) of 72 beats per minute.
Nopadon Juneam (Chiang Mai University) ECTI-CON 2014 May 16, 2014 11 / 31
14. .....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
.....
.
....
.
....
.
Originality
Basically, a compatible wellness group is a group consisting of those
who have similar interests and have their physical abilities close to
one another.
Finding a largest compatible wellness group of members is
considered a desirable task, especially in social networking, as
groups of users can be formed by friend suggestions or group
recommendations.
In the wellness applications such groups can lead to wellness
communities where people in the communities can help improve
one another’s health.
Nopadon Juneam (Chiang Mai University) ECTI-CON 2014 May 16, 2014 14 / 31
15. .....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
.....
.
....
.
....
.
Preliminaries
.
Definition (Vital Statistics’s Classification)
..
......
For q = |S|, the vital statistic’s classification is given by a set λ = {λ1, λ2,
. . ., λq}, where for 1 ≤ i ≤ q, each λi is a partition of ζ(si). We call λi the
classification for vital statistic si and an element in λi is called range.
.
Example
..
......
Classification for the BMI is given by λ1 = {[18.5, 23), [23, 25),
[25, 27.5), [27.5, 30), [30, 32.5), [32.5, 35)}.
Classification for the HRrest is given by λ2 = {[49, 56), [56, 62),
[62, 66), [66, 69), [70, 74), [74, 82)}.
Nopadon Juneam (Chiang Mai University) ECTI-CON 2014 May 16, 2014 15 / 31
16. .....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
.....
.
....
.
....
.
Preliminaries (cont.)
Classification for the BMI is given by λ1 = {[18.5, 23), [23, 25),
[25, 27.5), [27.5, 30), [30, 32.5), [32.5, 35)}.
Classification for the HRrest is given by λ2 = {[49, 56), [56, 62),
[62, 66), [66, 69), [70, 74), [74, 82)}.
.
Definition (Within Range Members’s Vital Statistics)
..
......
For q = |S|, the vital statistics of two distinct members Vi, Vj ∈ V are said
to be within range if, for 1 ≤ p ≤ q, the values of vip, vjp fall in the same
range in partition λp.
.
Example
..
......
The vital statistics of m1 and m4 are within range as m1 has a BMI (s1) of
21 and m4 has a BMI (s1) of 20, and m1 has a HRrest (s2) of 72 and m4
has a HRrest (s2) of 70.
Nopadon Juneam (Chiang Mai University) ECTI-CON 2014 May 16, 2014 16 / 31
17. .....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
.....
.
....
.
....
.
Compatible Wellness Group
.
Definition (Compatible Wellness Group)
..
......
A set G ⊆ M is called a group of members, where |G| denotes its size. G is
called a compatible wellness group if G has the five following conditions:
1. The preferences of all members are the same.
2. |G| − 1 is in the interval of the number of desired partners for each
member.
3. There is some activity common to all members.
4. There is some time period common to all members.
5. For all members in G, the vital statistics of each pair of members are
within range.
Nopadon Juneam (Chiang Mai University) ECTI-CON 2014 May 16, 2014 17 / 31
18. .....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
.....
.
....
.
....
.
Example of a Compatible Wellness Group
Classification for the BMI is given by λ1 = {[18.5, 23), [23, 25),
[25, 27.5), [27.5, 30), [30, 32.5), [32.5, 35)}
Classification for the HRrest is given by λ2 = {[49, 56), [56, 62),
[62, 66), [66, 69), [70, 74), [74, 82)}.
Domain m1’s wellness profile m4’s wellness profile
Preferences (1, 1, 0, 0) ∈ P (1, 1, 0, 0) ∈ P
Interval [1, 3] ∈ I [1, 3] ∈ I
Activities A1 = {a1, a3, a4} A4 = {a2, a3, a4}
Available times {[7, 8], [16, 17]} ∈ T {[6, 7], [16, 17]} ∈ T
Members’ vital statistics (21, 72) ∈ V (20, 70) ∈ V
.
Example
..
......
G = {m1, m4} is a compatible wellness group as m1 and m4 both have the
same preferences, both want to run or swim at 4-5 PM with 1-3 partners,
and both have BMIs and HRrestS within range.
Nopadon Juneam (Chiang Mai University) ECTI-CON 2014 May 16, 2014 18 / 31
19. .....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
.....
.
....
.
....
.
Example of a Compatible Wellness Group (cont.)
Classification for the BMI is given by λ1 = {[18.5, 23), [23, 25),
[25, 27.5), [27.5, 30), [30, 32.5), [32.5, 35)}
Classification for the HRrest is given by λ2 = {[49, 56) [56, 62),
[62, 66), [66, 69), [70, 74), [74, 82)}.
Domain m1’s wellness profile m5’s wellness profile
Preferences (1, 1, 0, 0) ∈ P (1, 1, 0, 0) ∈ P
Interval [1, 3] ∈ I [2, 5] ∈ I
Activities A1 = {a1, a3, a4} A5 = {a2}
Available times {[7, 8], [16, 17]} ∈ T {[8, 9], [16, 17]} ∈ T
Members’ vital statistics (21, 72) ∈ V (27, 77) ∈ V
.
Example
..
......
G = {m1, m5} is not a compatible wellness group because m5 has no
activity in common to m1.
Nopadon Juneam (Chiang Mai University) ECTI-CON 2014 May 16, 2014 19 / 31
22. .....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
.....
.
....
.
....
.
Time Complexity of the CWGTMP
.
Theorem (CWGTMP’s time complexity)
..
......Let n = |M|. The CWGTMP is solvable in O(n2) time.
.
Proof.
..
......
An exhaustive search for a largest group G such that my ∈ G takes
1. O(n) time to seek my’s exact match on P and C.
2. O(n) time to seek my’s exact match on S and V.
3. O(n2) time to try a possible match for my with maximum number of
partners on each a ∈ Ay and each t ∈ Ty. ⇒ O(|Ay||Ty|n2) time in
total.
Since |Ay| and |Ty| are constant in general, the running time of the search
algorithm takes O(n) + O(n) + O(n2) = O(n2) time.
Nopadon Juneam (Chiang Mai University) ECTI-CON 2014 May 16, 2014 22 / 31
26. .....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
....
.
....
.
.....
.
....
.
.....
.
....
.
....
.
Time Complexity of the CWGP
.
Lemma (CWGP’s subcase)
..
......
Let W = (M, C, P, I, T , A, S, V) be an instance of the WPM, λ be a set
of classifications, and r be an integer. (W, λ, r) is a YES-instance of the
CWGP if and only if (W, λ, m, r) is a YES-instance of the CWGTMP,
for some target member m ∈ M.
.
Theorem (CWGP’s time complexity)
..
......Let n = |M|. The CWGP is solvable in O(n3) time.
.
Proof.
..
......
The above lemma implies that an exhaustive search algorithm for the
CWGTMP can be used to solve the CWGP. In particular, instead of
computing a largest group G for one particular member, we expand the
search space through every member in M. Therefore, our new algorithm
for the CWGP runs in time O(n) × O(n2) = O(n3).
Nopadon Juneam (Chiang Mai University) ECTI-CON 2014 May 16, 2014 26 / 31