Wellness present-ecti-con-2014-v3

Post on 05-Apr-2017

164 views 0 download

Transcript of Wellness present-ecti-con-2014-v3

..........

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

......

.....

.....

.

.

......

Time Complexity of Finding Compatible Wellness Groupsin the Wellness Profile Model

Nopadon Juneam 1,2 and Sanpawat Kantabutra 2

1Department of Computer Science, Chiang Mai University, Chiang Mai, Thailand2The Theory of Computation Group, Department of Computer Engineering

Chiang Mai University, Chiang Mai, Thailand

Nopadon Juneam (Chiang Mai University) ECTI-CON 2014 May 16, 2014 1 / 31

..........

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

......

.....

.....

.

Outline

1 IntroductionWellness Profile Model (WPM)Instance of the WPM

2 Compatible Wellness Group in WPMGrouping DefinitionsCompatible Wellness Group with Target MemberProblem (CWGTMP)Compatible Wellness Group Problem (CWGP)

3 Conclusions and Open Problems

Nopadon Juneam (Chiang Mai University) ECTI-CON 2014 May 16, 2014 2 / 31

..........

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

......

.....

.....

.

Outline

1 IntroductionWellness Profile Model (WPM)Instance of the WPM

2 Compatible Wellness Group in WPMGrouping DefinitionsCompatible Wellness Group with Target MemberProblem (CWGTMP)Compatible Wellness Group Problem (CWGP)

3 Conclusions and Open Problems

Nopadon Juneam (Chiang Mai University) ECTI-CON 2014 May 16, 2014 3 / 31

..........

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

......

.....

.....

.

Wellness Profile Model (WPM)

Nopadon Juneam (Chiang Mai University) ECTI-CON 2014 May 16, 2014 4 / 31

..........

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

......

.....

.....

.

Wellness Profile Model (WPM)

The Wellness Profile Model (WPM) is a mathematicalmodel which ties together social networking, wellness, andcomplexity theory.The original model was proposed by R. Greenlaw in 2010 with theaim of leveraging the popularity of social networking to helpimprove people’s wellness.The basic idea behind the model is to create groups of memberswith some matching constraints according to their providedinformation in real time.

Nopadon Juneam (Chiang Mai University) ECTI-CON 2014 May 16, 2014 5 / 31

..........

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

......

.....

.....

.

Wellness Profile Model (WPM) (cont.)

In the real world application, a specific implementation of themodel was developed into the system of Elbrys Networks, Inc..

Nopadon Juneam (Chiang Mai University) ECTI-CON 2014 May 16, 2014 6 / 31

..........

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

......

.....

.....

.

Wellness Domains in the WPM

A WPM W = (M, C,P, I,A, T ,S,V)

Component DomainM MembersC CharacteristicsP PreferencesI Interval/number of desired partnersA ActivitiesT Available timesS Vital statisticsV Members’ vital statistics

Nopadon Juneam (Chiang Mai University) ECTI-CON 2014 May 16, 2014 7 / 31

..........

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

......

.....

.....

.

Instance of the WPM

Nopadon Juneam (Chiang Mai University) ECTI-CON 2014 May 16, 2014 8 / 31

..........

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

......

.....

.....

.

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 isgiven 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 areI = {[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

..........

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

......

.....

.....

.

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 areT = {{[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

..........

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

......

.....

.....

.

Interpretation

Domain m1’s wellness profileMembers m1 ∈ M

Characteristics C = {c1, c2, c3, c4}Preferences (1, 1, 0, 0) ∈ P

Interval [1, 3] ∈ IActivities A1 = {a1, a3, a4}

Available times {[7, 8], [16, 17]} ∈ TVital 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), andswimming (a4). His available times are at 7-8 AM and 4-5 PM. He has aBMI (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

..........

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

......

.....

.....

.

Outline

1 IntroductionWellness Profile Model (WPM)Instance of the WPM

2 Compatible Wellness Group in WPMGrouping DefinitionsCompatible Wellness Group with Target MemberProblem (CWGTMP)Compatible Wellness Group Problem (CWGP)

3 Conclusions and Open Problems

Nopadon Juneam (Chiang Mai University) ECTI-CON 2014 May 16, 2014 12 / 31

..........

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

......

.....

.....

.

Grouping Definitions

Nopadon Juneam (Chiang Mai University) ECTI-CON 2014 May 16, 2014 13 / 31

..........

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

......

.....

.....

.

Originality

Basically, a compatible wellness group is a group consisting of thosewho have similar interests and have their physical abilities close toone another.Finding a largest compatible wellness group of members isconsidered a desirable task, especially in social networking, asgroups of users can be formed by friend suggestions or grouprecommendations.In the wellness applications such groups can lead to wellnesscommunities where people in the communities can help improveone another’s health.

Nopadon Juneam (Chiang Mai University) ECTI-CON 2014 May 16, 2014 14 / 31

..........

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

......

.....

.....

.

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 theclassification 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

..........

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

......

.....

.....

.

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 saidto be within range if, for 1 ≤ p ≤ q, the values of vip, vjp fall in the samerange in partition λp.

.Example..

......

The vital statistics of m1 and m4 are within range as m1 has a BMI (s1) of21 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

..........

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

......

.....

.....

.

Compatible Wellness Group

.Definition (Compatible Wellness Group)..

......

A set G ⊆ M is called a group of members, where |G| denotes its size. G iscalled 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

..........

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

......

.....

.....

.

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 profilePreferences (1, 1, 0, 0) ∈ P (1, 1, 0, 0) ∈ P

Interval [1, 3] ∈ I [1, 3] ∈ IActivities A1 = {a1, a3, a4} A4 = {a2, a3, a4}

Available times {[7, 8], [16, 17]} ∈ T {[6, 7], [16, 17]} ∈ TMembers’ vital statistics (21, 72) ∈ V (20, 70) ∈ V

.Example..

......

G = {m1,m4} is a compatible wellness group as m1 and m4 both have thesame 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

..........

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

......

.....

.....

.

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 profilePreferences (1, 1, 0, 0) ∈ P (1, 1, 0, 0) ∈ P

Interval [1, 3] ∈ I [2, 5] ∈ IActivities A1 = {a1, a3, a4} A5 = {a2}

Available times {[7, 8], [16, 17]} ∈ T {[8, 9], [16, 17]} ∈ TMembers’ vital statistics (21, 72) ∈ V (27, 77) ∈ V

.Example..

......G = {m1,m5} is not a compatible wellness group because m5 has noactivity in common to m1.

Nopadon Juneam (Chiang Mai University) ECTI-CON 2014 May 16, 2014 19 / 31

..........

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

......

.....

.....

.

Compatible Wellness Group with Target MemberProblem (CWGTMP)

Nopadon Juneam (Chiang Mai University) ECTI-CON 2014 May 16, 2014 20 / 31

..........

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

......

.....

.....

.

Problem Definition

.Definition (Compatible Wellness Group with TargetMember Problem or CWGTMP)..

......

Instance: A WPM W = (M, C, P, I, A, T , S, V), a set ofclassifications λ, target member my ∈ M, and integer r.

Question: Does W contain a compatible wellness group G ⊆ M suchthat my ∈ G and |G| ≥ r ?

Nopadon Juneam (Chiang Mai University) ECTI-CON 2014 May 16, 2014 21 / 31

..........

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

......

.....

.....

.

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 takes1. 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 intotal.

Since |Ay| and |Ty| are constant in general, the running time of the searchalgorithm takes O(n) + O(n) + O(n2) = O(n2) time.

Nopadon Juneam (Chiang Mai University) ECTI-CON 2014 May 16, 2014 22 / 31

..........

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

......

.....

.....

.

Polynomial-time Algorithm for the CWGTMP

Algorithm Match on Component Time ComplexityGroup-By-Preferences P, C O(n)

Group-By-Statistics S, V O(n)Group-By-Availability a ∈ Ay O(n)

Group-By-Activity t ∈ Ty O(n)Max-Partners I O(n2)

CWGTM-Algorithm largest G ⊆ M, my ∈ G O(n2)

Table : Characterization of the CWGTM-Algorithm.

Nopadon Juneam (Chiang Mai University) ECTI-CON 2014 May 16, 2014 23 / 31

..........

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

......

.....

.....

.

Compatible Wellness Group Problem (CWGP)

Nopadon Juneam (Chiang Mai University) ECTI-CON 2014 May 16, 2014 24 / 31

..........

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

......

.....

.....

.

Problem Definition

.Definition (Compatible Wellness Group Problem orCWGP)..

......

Instance: A WPM W = (M, C, P, I, A, T , S, V), a set ofclassifications λ, and an integer r.

Question: Does W contain a compatible wellness group G ⊆ M of size ror more?

Nopadon Juneam (Chiang Mai University) ECTI-CON 2014 May 16, 2014 25 / 31

..........

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

......

.....

.....

.

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 setof classifications, and r be an integer. (W, λ, r) is a YES-instance of theCWGP 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 theCWGTMP can be used to solve the CWGP. In particular, instead ofcomputing a largest group G for one particular member, we expand thesearch space through every member in M. Therefore, our new algorithmfor the CWGP runs in time O(n)× O(n2) = O(n3).

Nopadon Juneam (Chiang Mai University) ECTI-CON 2014 May 16, 2014 26 / 31

..........

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

......

.....

.....

.

Outline

1 IntroductionWellness Profile Model (WPM)Instance of the WPM

2 Compatible Wellness Group in WPMGrouping DefinitionsCompatible Wellness Group with Target MemberProblem (CWGTMP)Compatible Wellness Group Problem (CWGP)

3 Conclusions and Open Problems

Nopadon Juneam (Chiang Mai University) ECTI-CON 2014 May 16, 2014 27 / 31

..........

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

......

.....

.....

.

Conclusions and Open Problems

ConclusionsDescribing the WPMFormulation of the wellness grouping constraintsDefining the CWGTMP and the CWGPCharacterizing their time complexity.Polynomial-time algorithms for solving them.

Open ProblemsVariations of the problem of grouping in the WPMParallel complexity of the two problemsFaster sequential algorithms for the two problems

Nopadon Juneam (Chiang Mai University) ECTI-CON 2014 May 16, 2014 28 / 31

..........

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

.....

.....

......

.....

......

.....

.....

.

Thanks Youjuneam.n@gmail.com

sanpawat@alumni.tufts.edu

Nopadon Juneam (Chiang Mai University) ECTI-CON 2014 May 16, 2014 29 / 31