Seda Polat Erdeniz

Ilias Maglogiannis

Andreas Menychtas
email: amenychtas@bioassist.gr

Alexander Felfernig
email: alexander.felfernig@http

Thi Ngoc

Trang Tran
email: ttrang@ist.tugraz.at@http

Recommender Systems for IoT Enabled m-Health Applications

Recommender systems can help to more easily identify relevant artifacts for users and thus improve user experiences. Currently recommender systems are widely and effectively used in the e-commerce domain (online music services, online bookstores, etc.). On the other hand, due to the rapidly increasing benefits of the emerging topic Internet of Things (IoT), recommender systems have been also integrated to such systems. IoT systems provide essential benefits for human health condition monitoring. In our paper, we propose new recommender systems approaches in IoT enabled mobile health (m-health) applications and show how these can be applied for specific use cases. In this context, we analyze the advantages of proposed recommendation systems in IoT enabled m-health applications.

Introduction

Empowering and motivating people is a major challenge. This becomes especially crucial when it comes to the health and the physical condition of an individual [START_REF] Swan | Sensor mania! the internet of things, wearable computing, objective metrics, and the quantified self 2.0[END_REF]. It is a well-known fact that the average human lifetime is increasing. Living longer implies the risk of age related health problems that reduce significantly the quality of life. Therefore, many people need to improve and maintain their independence, functional capacity, health status as well as their physical, cognitive, mental and social wellbeing. Modern mobile and sensor technologies enable the recording of all kinds of data related to a person's daily lifestyle, such as exercises, steps taken, body weight, food consumption, blood pressure, cigarettes smoked, etc. This type of self-data tracking is often referred as the Quantified-Self concept [START_REF] Swan | Sensor mania! the internet of things, wearable computing, objective metrics, and the quantified self 2.0[END_REF].

Recent works have shown that tracking measurements such as step counts, spent calories and body weight are very effective to make the user conscious of its importance and it may lead to lifestyle changes by motivating a person to engage in physical exercise [START_REF] Mcgrath | Wellness, fitness, and lifestyle sensing applications[END_REF]. Additionally, by tracking measurements over time, he/she gets insights regarding his/her progress and he/she is able to experience the direct relation between his efforts and the actual outcome. For instance, going for jogging twice a week leads to a decrease of body fat percentage [START_REF] Munson | Exploring goal-setting, rewards, self-monitoring, and sharing to motivate physical activity[END_REF].

As an emerging topic, the Internet of Things (IoT) [START_REF] Atzori | The Internet of Things: A Survey[END_REF][START_REF] Greengard | The Internet of Things[END_REF][START_REF] Miorandi | Internet of Things: Vision, Applications and Research Challenges[END_REF] represents a networked infrastructure of connected different types of devices. In this context, a huge amount of services and applications is created which makes the identification of the relevant ones a challenging task. Several IoT solutions have been proposed to implement the concept of Quantified-Self and related challenges in the areas of health care and assisted living [START_REF] Maglogiannis | Fall detection and activity identification using wearable and hand-held devices[END_REF][START_REF] Menychtas | Automated integration of wireless biosignal collection devices for patient-centred decision-making in point-of-care systems[END_REF][START_REF] Wei | How wearables intersect with the cloud and the internet of things: Considerations for the developers of wearables[END_REF]. AGILE4 is an EU-funded project aiming to build a modular hardware and software gateway for IoT with support for protocol interoperability, device and data management, IoT applications execution, and external Cloud communication. The main concept behind AGILE is to enable users to easily build IoT applications and control connected devices through a modular IoT gateway and a set of full stack (OS, runtime and applications) IoT software components. One of five pilot projects of AGILE is Quantified-Self which is an IoT enabled m-health (mobile health) system based on the AGILE gateway environment.

In the AGILE project, we have developed new recommendation approaches especially useful in IoT scenarios [START_REF] Felfernig | Towards configuration technologies for iot gateways[END_REF][START_REF] Felfernig | Recommendation technologies for iot edge devices[END_REF][START_REF] Valdez | Recommender systems for health informatics: State-of-the-art and future perspectives[END_REF]. Recommender systems [START_REF] Jannach | Recommender Systems -An Introduction[END_REF] suggest items (alternatives, solutions) which are potential interest for a user. Examples of related questions are: which book should be purchased?, which test method should be applied ?, which method calls are useful in a certain development context? or which applications are of potential interest for the current user? A recommender system can be defined as any system that guides a user to interesting or useful objects for the user in a large space of possible options or that produces such objects as output [START_REF] Felfernig | Constraint-based recommender systems: Technologies and research issues[END_REF].

In this paper, we propose new recommendation approaches in the IoT enabled m-health domain based on our example domain Quantified-Self. In Quantified-Self, we collect patients data using variety of IoT technologies. Based on the measured patients information, our proposed recommender provides life quality increasing solutions both to patients and physicians.

The remainder of this paper is organized as follows. First of all, we give an overview of the state of the art in recommendation technologies in IoT enabled mhealth (Section 2). In Section 3, we introduce the example application Quantified-Self, thereafter we explain our proposed recommendation approaches for each use case based on the sample dataset from Quantified-Self (Section 4). Finally, in Section 5 we conclude our work with a discussion of issues for future work.

Related Work

IoT-based applications enable a deeper understanding for recommender systems which can primarily be explained by the availability of heterogeneous information sources [START_REF] Amato | A recommendation system for browsing of multimedia collections in the internet of things[END_REF][START_REF] Frey | A Novel Recommender System in IoT[END_REF][START_REF] Yao | Things of Interest Recommendation by Leveraging Heterogeneous Relations in the Internet of Things[END_REF]. Thanks to this ongoing IoT revolution, huge amounts of data are being collected in clinical databases representing patients' health states.

Sensor-based Internet-enabled devices equipped with radio frequency identification (RFID) [START_REF] Want | An introduction to rfid technology[END_REF] tags and other communication enablers [START_REF] Chen | Business intelligence and analytics: From big data to big impact[END_REF] are opening up exciting new ways of innovative recommendation applications in the health domain. Hence, required digital information is already available for patient-oriented decision making. This means, when this data can be used by recommendation algorithms, very important results can be obtained [START_REF] Chen | Business intelligence and analytics: From big data to big impact[END_REF].

In [START_REF] Wiesner | Health recommender systems: concepts, requirements, technical basics and challenges[END_REF], authors propose to centralize personal health records (PHR) using a system which allows access for the owner as well as for authorized health professionals. In this system, recommender systems may support patients with additional laymen-friendly information helping to better comprehend their health status as represented by their record.

PHR management systems may fail to satisfy the individual medical information needs of their users. Personalized recommendations could solve this problem. In [START_REF] Wiesner | Adapting recommender systems to the requirements of personal health record systems[END_REF], a ranking procedure based on a health graph is proposed which enables a match between entries of a PHR management system and health information artifacts. This way, the user of such a system can obtain individualized health information he might be interested in.

Researchers have indicated that integrated medical information systems are becoming an essential part of modern healthcare systems. Such systems have evolved to an integrated enterprise-wide system. In particular, such systems are considered as a type of enterprise information system or enterprise resource planning (ERP) [START_REF] Kremers | Enterprise resource planning: Erp system migrations[END_REF] system addressing healthcare industry sector needs. As part of efforts, nursing care plan recommender systems can provide clinical decision support, nursing education, clinical quality control, and serve as a complement to existing practice guidelines [START_REF] Duan | Healthcare information systems: data mining methods in the creation of a clinical recommender system[END_REF]. The authors of [START_REF] Duan | Healthcare information systems: data mining methods in the creation of a clinical recommender system[END_REF] exploit correlations among nursing diagnoses, outcomes and interventions to create a recommender system for constructing nursing care plans.

In [START_REF] Pattaraintakorn | Web based health recommender system using rough sets, survival analysis and rule-based expert systems[END_REF], a health recommendation system architecture is proposed using rough sets, survival analysis approaches and rule-based expert systems to recommend clinical examinations for patients or physicians from patients' self reported data. Such data can be treated as condition attributes, while survival time from a follow-up study can be treated as the target function.

Authors of [START_REF] Datta | Applying internet of things for personalized healthcare in smart homes[END_REF] propose the application of IoT for personalized healthcare in smart homes. An IoT architecture is presented which enables such healthcare services. Continuous monitoring of physical parameters and processing of the medical data form the basis of smarter, connected and personalized healthcare. The core functionalities of the IoT architecture are exposed using Restful web services.

In this paper, we apply recommendation techniques which are also applied in these related works. The added value in our work is especially the differentiation in recommended items indeed. We propose two new recommenders for our IoT project which recommends new apps, healthcare devices, and physical activity plans for patients.

3 Example Domain: Quantified-Self Quantified-Self is used as an example domain to explain our proposed recommendation approaches throughout this paper. The realization of Quantified-Self concept requires the integration of several m-health and IoT elements (see Fig. 1), where proposed applications are orchestrated around the AGILE Gateway [START_REF] Menychtas | A versatile architecture for building iot quantified-self applications[END_REF]. The gateway connects to the home network and through the gateway's management user interface, the owner has access to all provided features, such as reporting and visualization tools, can manage (store/view/edit) their data and define an access policy to share data with their social network contacts. Wearable activity trackers and medical sensors automatically communicate with the gateway whenever within range, and upload the most recent data. Integration with cloud platforms allows data synchronization between the gateway and the owner's online profile, which enables the user to access their data through a web application. In addition, health and activity data can be downloaded to the gateway from the owner's personal accounts on relevant platforms. As illustrated in Fig. 1, each user of the Quantified-Self application is provided with a set of activity tracking devices and biosignals sensors (such as oximeters 5 , blood pressure monitors6 or glucometers 7 ), to monitor their daily physical activity and physical condition. All activity data and biosignal measurements are stored locally, on the user's gateway. Users are able to visualize and manage their data, create reports and export the data from the gateway or even import past data from other cloud services they might have used before, such as Fitbit8 , GoogleFit9 , etc. In parallel, motion and lifestyle data can be processed and analyzed on the gateway, so as personalized recommendations are sent to the user's smart phone in order to encourage them to reach their physical activity goals. Moreover, users are able to share their activity data and achievements with certain people/users from their social circle, including relatives, friends and most importantly their physicians.

The Quantified-Self concept is targeting data acquisition on aspects of a person's daily life in terms of inputs (e.g. food consumed, quality of surrounding air), states (e.g. mood, arousal, blood oxygen levels), and performance (mental and physical activities) through a modern, health centric, social and mobile enabled, communication platform that resides in the gateway (in terms of collecting and visualizing data). The application is developed using the AGILE environment and software stack, and uses the communication modules of the gateway to collect data from self-tracking devices of users: wristbands or smart watches, weighting scales, oximeters, blood pressure monitors, etc. In addition, the cloud integration modules are exploited for periodically importing activity data and biosignals from other providers and applications through their public APIs.

Since the implementation of the aforementioned application is ongoing and the number of users who are currently using it is limited, an extended dataset from an established m-health solution [START_REF] Menychtas | Automated integration of wireless biosignal collection devices for patient-centred decision-making in point-of-care systems[END_REF][START_REF] Panagopoulos | Utilizing a homecare platform for remote monitoring of patients with idiopathic pulmonary fibrosis[END_REF] has been used as the knowledge base for our recommender. The main dataset consists of the "biosignal" measurements of patients and elders, which are acquired directly from the biosignal sensors that users are equipped with. Both in the present Quantified-Self solution and the application which provided the knowledge base, sensors that are used support wireless communication, and particularly Bluetooth, for simplified integration of the sensors, and for seamless, real-time synchronization of measurement data. The sensors currently supported are the following: activity trackers, pulse oximeters, blood pressure monitors, weighing scales, spirometers, glucometers, and thermometers. These sensors measure the following biosignal types: step count, heart rate (bpm), oxygen saturation (%), blood pressure (mmHg), FEV1 (L), peak flow (L/min), blood glucose levels (mg/dL), and body temperature (Celsius/Fahrenheit). It should be noted though that the modular design that has been followed, enables the potential integration of additional devices in the same application, which may require different operational workflows and communication patterns.

The biosignals' dataset includes approximately half million records of the aforementioned biosignals from one hundred users in a time frame of three years. Besides the biosignal data, the knowledge base includes information for users' demographics (gender, age, location), as well as their personal health record (lab results, medication and allergies). In order to ensure the smooth communication between the different components of the system, and for the smooth data integration with external systems well established data models have been used. Therefore in the proposed approach, all components and workflows which require data exchange and/or storage follow the Fast Healthcare Interoperability Resources Specification (FHIR) 10 .

Recommendation Systems in Quantified-Self

We explain our proposed recommendation approaches for IoT enabled m-health applications based on the given example domain Quantified-Self. The increasing trend of using Quantified-Self solutions is also helpful for this improvement. The utilization of recommendation technologies is essential for improving the health conditions of individuals. The users of IoT enabled m-health applications can get recommendations for new activity plans, IoT enabled m-health devices, applications, healthy nutritions. All these recommendations help the users to enhance their life style and reach their target health conditions easier than before. These recommendations indeed play an important role like a personal trainer or personal coach.

Use Case -1: Virtual Coach

In order to motivate subscribers/users for sportive activities, Quantified-Self -Virtual Coach collects demographic information (age, location, physical condition, medical history, chronic diseases, etc.) of each user. It stores user profiles on its online server and a recommender engine calculates the similarities between users based on their demographic data. Using the similar users' information, a new activity plan (how often, what to measure, which activities) or a new IoT device (a wristband, step counter watch, etc.) can be recommended to users.

In this case, a recommender engine uses Collaborative Filtering as the recommendation technology to find similarities between users. Quantified-Self -Virtual Coach recommends new activities or new devices to users based on these similarities. Collaborative Filtering [START_REF] Konstan | Grouplens: applying collaborative filtering to usenet news full text[END_REF] is based on the idea of promotion, where the opinion of similar users are considered. These users are also denoted as the nearest neighbors which means these are the users who have similar preferences compared to the current user. The first step of a collaborative filtering recommender is to identify the k-nearest neighbors 11 and to guess the preferences of the current user using the purchased items by nearest neighbors. There are several similarity metrics in the context of collaborative filtering scenarios for determining nearest neighbors [START_REF] Jannach | Recommender Systems -An Introduction[END_REF]. For the purposes of our example, we use a simplified formula that supports the identification of k-nearest neighbors 12 (see Formula 1).

similarity(user a , user b ) = 1 1 + Σ n property=1 |eval(user a ) -eval(user b )| (1)
When Formula 1 is applied to the example of Table 1, property becomes demographics and devices of users. Thus, for the seven properties (age, gender, location, chronic diseases, oximeter, wristband, BPM (hearth beats per minute) device) of each user, the calculation result of eval(user a) -eval(user b) for the i th property is 0 if their values are same, otherwise it is 1. For instance, for the first property age, the calculation result of eval(user 1) -eval(user 2) is 1, because age of user 1 is young whereas age of user 2 is middle. Since they do not have the same values, their difference is 1. For another instance, for the sixth property wristband, the calculation result of eval(user 1) -eval(user 2) is 1, because the usage of oximeter of user 1 is whereas for user 3 it is . Since they have the same values, when property = 5, the result of eval(user 1) -eval(user 3) is 0. In Table 1, user-1 (the nearest neighbor ) has demographics which are similar to those of the current user. Consequently, a collaborative recommender proposes devices to the current user which have been investigated by the nearest neighbor (e.g., an oximeter device is recommended to the current user).

Use Case -2: Virtual Nurse

Quantified-Self -Virtual Nurse motivates different types of chronic patients (i.e diabetes, asthma, cancer, cardiovascular) to reach their goals on the basis of a recommended plan. It collects the measured data of patients and checks their health conditional targets. If the measured values are very far from their expected (target) values, then some specific recommendations can be placed for those patients. The recommendations should be personalized and related to the base line of each user's data, which will be permanently updated.

The patient medical data includes the personalized models that shows the behavioral responses of the patients versus the coach interventions to discover best-practices and measure adherence. The recommender could act as a decision support system that gathers information from the patient, finds an activity plan that matches with the available objectives and offers a personalized list. A physician might intervene (semi-supervised recommendation) to select the collected information that are more related with the wellbeing of the patient.

In this case, the recommender engine uses Content-based Filtering as the recommendation technology to find a related plan based on the user data. Quantified-Self -Virtual Nurse recommends new activity plans to users based on their actual and expected measurements. Content-based Filtering [START_REF] Pazzani | Learning and revising user profiles: The identification of interesting web sites[END_REF] is based on the assumption of monotonic personal interests. For example, users interested in the topic sports devices are generally not changing their interests so often but keep their interests in the same topic. The basic approach of content-based filtering is to compare the content of already used items with new items that can potentially be recommended to the user.

Table 2. Actual and expected (targets) measurements of patient-1. The targets of the available activity plans are also represented. Arrows denote increase(↑)/decrease(↓)/stay(←→) targets of a plan. For instance, plan-2 is targeting to decrease the blood pressure and weight. Therefore, plan-2 includes activities which can decrease these two parameters. A simplified example of a related recommendation approach is given in Table 2. When applying a content-based filtering based approach, recommended items (plans) are determined on the basis of the similarity of the patient's targets and available plans. Similar to collaborative filtering, there are different types of similarity metrics [START_REF] Jannach | Recommender Systems -An Introduction[END_REF]. For the purposes of our examples, we introduce a simplified formula that supports the identification of, for example, relevant plans for the patient-1 (see Formula 2). similarity(patient, plan) = #(targets(patient) ∩ targets(plan)) #(targets(patient) ∪ targets(plan))

Formula 2 determines the similarity on the basis of the targets of plans and targets of patient-1. For instance, the similarity between patient-1 and plan-3 is calculated as 0.33 where #(targets(patient) ∩ targets(plan)) = 1 since there is only 1 same target (target for hearth-rate) and #(targets(patient) ∪ targets(plan)) = 3 where the number of targets for both is three (systolic blood pressure, hearth-rate, and weight). In our example of Table 2, plan-1 has the highest similarity with the targets of patient-1, therefore plan-1 is recommended to patient-1.

Fig. 1 .

 1 Fig. 1. Software architecture of Quantified-Self on the basis of the AGILE gateway.

Table 1 .

 1 Profiles of users are stored in the online server of the recommender engine in anonymous mode (without their names, addresses, etc.).

				Profiles of Users
			Demographics			Devices
	profile	age	gender	location	chronic	oximeter	wristband	BPM
					diseases			device
	user-1	young	male	urban	asthma			-
	user-2	middle	female	suburban	diabetics	-	-
	user-3	elder	male	suburban	diabetics	-		-
	active user	young	female	urban	asthma	-		-

AGILE (An Adaptive & Modular Gateway for the IoT) is an EU-funded H2020 project 2016-2018 -see http://agile-iot.eu/.

https://en.wikipedia.org/wiki/Pulse oximetry

http://bestreviews.com/best-blood-pressure-monitors

https://en.wikipedia.org/wiki/Glucose meter

https://www.fitbit.com/at/home

https://www.google.com/fit/

https://www.hl7.org/fhir/

k represents the number of users with similar profile or purchased items compared to the current user.

For simplicity we assume k = 1.

Conclusions and Future Work

The utilization of recommender systems is considered essential for improving the health conditions of individuals. In this paper, We proposed two new recommenders for our IoT project which recommends new apps, healthcare devices, and physical activity plans for patients. We analyzed the applicabilities and the advantages of recommendation technologies in IoT enabled m-health applications by showing examples on the pilot application (Quantified-Self ) of our project (AGILE ). We have proposed two recommendation use cases Virtual Coach and Virtual Nurse which help users/patients to improve their health conditions. This improvement is provided by correct device or sportive activity recommendations for users by Virtual Coach, and correct activity plan recommendation for patients by Virtual Nurse. As future work, we will implement mentioned recommender engines for Quantified-Self system and analyze the results in the bases of changes in the health data of users. Besides, we plan to detect anomalies in Quantified-Self activity plans and send additional recommendations to users/physicians.


Mai Alzamel
email: [mai.alzamel@kcl.ac.uk

Maxime Crochemore
email: maxime.crochemore@kcl.ac.uk

Costas S Iliopoulos
email: costas.iliopoulos@kcl.ac.uk

Tomasz Kociumaka
email: [kociumaka@mimuw.edu.pl

Ritu Kundu
email: ritu.kundu]@kcl.ac.uk

Jakub Radoszewski

Wojciech Rytter
email: rytter@mimuw.edu.pl

Tomasz Waleń
email: walen]@mimuw.edu.pl

How much different are two words with different shortest periods

 in the context of quasiperiodicities. We say that a period p of a word x is primitive if x does not have any smaller period p which divides p. For integers p, n (p ≤ n) we define Pp(n) as the set of words of length n with primitive period p. We show several results related to the following functions introduced in this paper for p = q and n ≥ max(p, q). Dp,q(n) = min { dist(x, y) : x ∈ Pp(n), y ∈ Pq(n) }, Np,q(h) = max { n : Dp,q(n) ≤ h }.

Introduction

Consider a word x of length |x| = n, with its positions numbered 0 through n -1. We say that x has a period p if x i = x i+p for all 0 ≤ i < n -p. Our work can be seen as a quest to extend Fine and Wilf's Periodicity Lemma [START_REF] Fine | Uniqueness theorems for periodic functions[END_REF], which is a ubiquitous tool of combinatorics on words.

Lemma 1 (Periodicity Lemma [START_REF] Fine | Uniqueness theorems for periodic functions[END_REF]). If a word x has periods p and q and |x| ≥ p + q -GCD(p, q), then x also has a period GCD(p, q). Other known extensions of this lemma include a variant with three [START_REF] Castelli | Fine and Wilf's theorem for three periods and a generalization of Sturmian words[END_REF] and an arbitrary number of specified periods [START_REF] Constantinescu | Generalised Fine and Wilf's theorem for arbitrary number of periods[END_REF][START_REF] Holub | On multiperiodic words[END_REF][START_REF] Justin | On a paper by Castelli, Mignosi[END_REF][START_REF] Tijdeman | Fine and Wilf words for any periods II[END_REF], the so-called new periodicity lemma [START_REF] Fan | A new periodicity lemma[END_REF][START_REF] Bai | The new periodicity lemma revisited[END_REF], a periodicity lemma for repetitions that involve morphisms [START_REF] Manea | Fine and Wilf's theorem and pseudorepetitions[END_REF], and extensions into periodicity of partial words [START_REF] Berstel | Partial words and a theorem of Fine and Wilf[END_REF][START_REF] Blanchet-Sadri | Graph connectivity, partial words, and a theorem of Fine and Wilf[END_REF][START_REF] Blanchet-Sadri | Fine and Wilf's periodicity result on partial words and consequences[END_REF][START_REF] Blanchet-Sadri | Partial words and a theorem of Fine and Wilf revisited[END_REF][START_REF] Blanchet-Sadri | Fine and Wilf's theorem for partial words with arbitrarily many weak periods[END_REF][START_REF] Blanchet-Sadri | Abelian periods, partial words, and an extension of a theorem of Fine and Wilf[END_REF][START_REF] Smyth | A new approach to the periodicity lemma on strings with holes[END_REF], into abelian [START_REF] Constantinescu | Fine and Wilf's theorem for Abelian periods[END_REF] Supported by the Polish National Science Center, grant no 2014/13/B/ST6/00770. and k-abelian [START_REF] Karhumäki | Fine and Wilf's theorem for k-abelian periods[END_REF] periodicity, into bidimenional words [START_REF] Mignosi | On Fine and Wilf's theorem for bidimensional words[END_REF], and other variations [START_REF] Giancarlo | Generalizations of the periodicity theorem of Fine and Wilf[END_REF][START_REF] Mignosi | Variations on a theorem of Fine & Wilf[END_REF].

We say that a word x of length n is periodic if it has a period p such that 2p ≤ n. For two words x and y of length n, by dist(x, y) we denote their Hamming distance being the number of positions i = 0, . . . , n -1 such that x i = y i . The following folklore fact gives a lower bound on how different are two distinct periodic words. Its proof can be found in [START_REF] Amir | Two strings at hamming distance 1 cannot be both quasiperiodic[END_REF]. Fact 2. If x and y are distinct periodic words of the same length, then dist(x, y) = 1.

We present several generalizations of this fact.

Results similar to Fact 2 were presented recently in the context of quasiperiodicity [START_REF] Amir | Two strings at hamming distance 1 cannot be both quasiperiodic[END_REF]. We say that a word x has a cover u if each position in x is located inside an occurrence of u in x. The word x is called quasiperiodic if it has a cover u other than x. In [START_REF] Amir | Two strings at hamming distance 1 cannot be both quasiperiodic[END_REF] the following generalization of Fact 2 was shown: dist(x, y) > 1 for any two distinct quasiperiodic words x, y of the same length. This type of fact has potential applications; see [START_REF] Amir | Approximate cover of strings[END_REF].

There is a quantitative difference between periods and covers. For example, there are words x and y of length 1024 with shortest covers of length 4 and 5, respectively, and dist(x, y) = 2:

x = (abaa) 256 and y = aaba(abaa) 255 with covers abaa and aabaa. However, if x and y are words of length 1024 with shortest periods 4 and 5, respectively, then we must have dist(x, y) ≥ 357.

We say that a period p of a word x is primitive if no proper divisor of p is a period of x, i.e., if p | p and p is a period of x, then p = p. We define

P p (n) = { |x| = n, p is a primitive period of x }.
The ultimate goal of this work is a characterization of the function D p,q defined for p = q and n ≥ max(p, q) as:

D p,q (n) = min { dist(x, y) : x ∈ P p (n), y ∈ P q (n) }.
As D p,q is non-decreasing for given p, q, it can be described by the following auxiliary function:

N p,q (h) = max { n : D p,q (n) ≤ h }.
One can note that Lemma 1 can be equivalently formulated as N p,q (0) < p + q -GCD(p, q). Similarly, an equivalent formulation of Fact 2 is N p,q (1) < 2q.

Fine & Wilf [START_REF] Fine | Uniqueness theorems for periodic functions[END_REF] also proved that the bound p + q -GCD(p, q) of Lemma 1 cannot be improved. Consequently, N p,q (0) = p + q -GCD(p, q) -1. On the other hand, we show that N p,q (1) = 2q -1 only for p | q. Hence, the bound N p,q (1) < 2q of Fact 2 is not tight in general.

Our results. In Section 2 we consider the case that p | q. In the remaining sections, we only consider the case of p < q and p q. In Section 3 we show exact values of the function D p,q for p + q -GCD(p, q) ≤ n ≤ 2q. In Section 4, we show the following bounds valid for abitrary n ≥ q:

n-q p ≤ D p,q (n) ≤ 2 n-q p .
We also prove an alternative bound D p,q (n) ≥ 2n p+q valid for n ≥ p + q.

Preliminaries

Let us consider a finite alphabet Σ. If x is a word of length |x| = n, then by x i ∈ Σ for i = 0, . . . , n -1 we denote its ith letter. We say that a word v is a factor of a word x if there exist words u and w such that x = uvw. A factor v is called a prefix of x if u is an empty word in some such decomposition and a suffix if w is an empty word in some such decomposition. By x[i.

.j] we denote the factor x i . . . x j . If x i = x i+p for all 0 ≤ i < n -p for some integer p, then p is called a period of x and the prefix of x of length p is called a string period of x. If x has period p, then y is called a periodic extension of x with period p if y also has period p and has x as a prefix.

We say that a period p is primitive if no proper divisor of p is a period of x. Note that the shortest period (denoted p = per(x)) is always primitive.

We say that a word x is primitive if there exists no other word u and integer k > 1 such that x = u k . Note that p is a primitive period of x if and only if the corresponding string period is a primitive word. Two words x and y are each other's cyclic rotations if there exist words u and v such that x = uv and y = vu. In this case we also say that |u| is the shift between x and y.

For a sequence of positive integers (a 1 , . . . , a m ), we define a (a 1 , . . . , a m )decomposition of a word x as a sequence of consecutive factors of x of lengths a 1 , . . . , a m , a 1 , . . . , a m , . . . The sequence ends at the last complete factor that can be cut out of x; see Fig. 2 for an example. If p | q, we can give a simple complete characterization of functions N p,q and D p,q . Fact 3. If p | q and p < q, then D p,q (n) = n q and N p,q (h) = q • (h + 1) -1.

Proof. We first show that D p,q (n) ≥ n q . Consider a positive integer n, words x ∈ P p (n), y ∈ P q (n), and the (q)-decompositions of x and y: α 1 , . . . , α k and β 1 , . . . , β k . Observe that α 1 = . . . = α k and β 1 = . . . = β k because q is a period of both x and y, but α 1 = β 1 because q is a primitive period of y, but not a primitive period of x. Hence, dist(x, y) ≥ k.

As for the other inequality on D p,q (n), let us take x = (a p-1 b) n/p a n mod p and let y be the word that is obtained from x by changing the letters at positions i ≡ q -1 (mod q) from b to c. Then dist(x, y) = n q . Finally, the formula for N p,q (h) follows directly from the other one.

Henceforth, we will always assume that p q and q p.

Exact Values for Small n

Let us start with the following useful lemma. Lemma 4. Let x be a word of length n and let y by its cyclic rotation by s characters. If x = y, then dist(x, y) ≥ 2. Moreover, there are two mismatches between x and y located at least GCD(n, s) positions apart.

Proof. Note that y i = x (i+s) mod n for 0 ≤ i < n. Since x = y, we have x a = y a = x (a+s) mod n for some position a. Let k be the smallest positive integer such that x a = x (a+ks) mod n . Due to x (a+s) mod n = x a and x (a+ns) mod n = x a , we have

1 < k ≤ n. Let b = (a + (k -1)s) mod n. Note that x b = x a = x (b+s) mod n = y b .
Hence, a and b are positions of two distinct mismatches between x and y. Moreover, b ≡ (a + (k -1)s) mod n ≡ a (mod GCD(n, s)). Consequently, these two mismatches are indeed located at least GCD(n, s) positions apart.

Lemma 5. Consider positive integers p, q satisfying p < q and p q. Let x and y be words of length n such that p + q -GCD(p, q) ≤ n ≤ q + p q p -1, p is a period of x, and q is a period of y but not a period of x. Then dist(x, y) ≥ n-q p + n-q+GCD(p,q) p .

Proof. Let u = x[0..p -1] and let v be the cyclic rotation of u by q characters. Note that u is a string period of x, so u = v; otherwise, q would be a period of x. Consequently, Lemma 4 provides two distinct indices a, b such that u a = v a , u b = v b , and a ≤ b -GCD(p, q) < p -GCD(p, q). Let us define

A = kp + a : 0 ≤ k < n-q+GCD(p,q) p , B = kp + b : 0 ≤ k < n-q p . Observe that max A = n-q+GCD(p,q) p p -p + a ≤ n -q + GCD(p, q) -p + a < n -q and max B = n-q p p -p + b ≤ n -q -p + b < n -q.
Moreover, max A ≤ p q/p -1+GCD(p,q) p p -p + a = q p p -p + a < q + a ≤ q + min(A ∪ B), and max B ≤ p q/p -1 p p -p + b = q p p -p < q ≤ q + min(A ∪ B).

Consequently, for each i ∈ A ∪ B, there are positions x i and x i+q , and all these 2(|A| + |B|) positions are distinct. Moreover, observe that for i ∈ A, we have x i = u a = v a = x i+q , while for i ∈ B, x i = u b = v b = x i+q . Thus, for i ∈ A ∪ B, we have x i = x i+q , but y i = y i+q ; hence x i = y i or x i+q = y i+q . The positions we consider are distinct, so dist(x, y) ≥ |A ∪ B| = |A| + |B| = n-q p

+ n-q+GCD(p,q) p , as claimed. 3. Illustration of the equalities in the bound in Lemma 5 for q p = 1.

q p x u * * a b u * a + p v * * a + q b + q v * a + b + q Fig.
Lemma 6. Consider coprime integers p, q satisfying 1 < p < q. Let w be a word of length p + q -2 with periods p and q, but without period 1. Moreover, let n be an integer such that p + q -1 ≤ n ≤ q + q p p -1, and let x and y be periodic extensions of w of length n preserving periods p and q, respectively. Then per(x) = p, per(y) = q, and dist(x, y) ≤ n-q p + n-q+1 p , Proof. Claim. If a position i satisfies i < q or (i-q) mod p < p-2, then x i = y i .

Proof. The claim is clear for i < q+p-2 since due to the common prefix of x and y. Thus, we consider a position i = q +kp+r with 1 ≤ k < q p and 0 ≤ r < p-2. We have x q+kp+r = x q+r = y q+r = y r = x r = x kp+r = y kp+r = y q+kp+r . This is because positions r < kp + r < q + r are within the common prefix of x and y.

Consequently, dist(x, y) ≤ {i : q ≤ i < n ∧ (i -q) mod p ≥ p -2} = {j : 0 ≤ j < n -q ∧ j mod p = p -1} + {j : 0 ≤ j < n -q ∧ j mod p = p -2} = n-q p + n-q+1 p ,
as claimed. Next, we prove that p := per(x) is equal to p. Note that p ≤ p by definition of x. For a proof by contradiction, suppose that p < p. Note that w has periods p and q. Moreover, |w| = p + q -2 ≥ p + q -1, so GCD(p , q) is a period of w. Moreover, n ≥ p+q -1 ≥ p+GCD(p , q)-1, so GCD(GCD(p , q), p) is a period of x. However, GCD(GCD(p , q), p) = GCD(p , GCD(q, p)) = 1 is not a period of w, which is a prefix of x.

Similarly, suppose that q := per(y) < q. We observe that |w| = p + q -2 ≥ p + q -1, so GCD(p, q ) is a period of w. Moreover, n ≥ p + q -1 ≥ GCD(p, q ) + q -1, so GCD(GCD(p, q ), q) is a period of y. However, GCD(GCD(p, q ), q) = GCD(q , GCD(p, q)) = 1 is not a period of w, which is a prefix of y. Theorem 7. If p < q, p q, and p + q -GCD(p, q) ≤ n ≤ q + q p p -1, then

D p,q (n) = n -q p + n + GCD(p, q) -q p . (1)
Proof. Lemma 5 gives a lower bound of D p,q (n). Our upper bound is based on Lemma 6. Let d = GCD(p, q), p = p d , q = q d , and n = n d . Observe that 1 < p < q and p + q -1 ≤ n ≤ q + q p p -1. Hence, Lemma 6 results in strings x , y with of length n with shortest periods p and q respectively, and with dist(x , y ) ≤ n -q p + n -q +1 p = n-q p + n-q+GCD(p,q) p .

Let c be a character occurring neither in x nor in y . Let us define x and y so that x id+d-1 = x i and y = id+d-1 = y i , and x j = y j = c if j mod d = d -1. Note that dist(x, y) = dist(x , y ) and |x| = |y| = n. Also, observe that due to the choice of the character c, all periods of x and y are larger than dn or multiples of d. Consequently, per(x) = dper(x ) = dp = p and per(y) = dper(y ) = dq = q. This completes the construction.

Corollary 8. The formula (1) of Theorem 7 applies for p + q -GCD(p, q) ≤ n ≤ 2q. Fact 9. The function D p,q (n) is non-decreasing for n ≥ p + q -GCD(p, q). Moreover:

D p,q (n) = h ⇐⇒ N p,q (h -1) < n ≤ N p,q (h) N p,q (h) = n ⇐⇒ D p,q (n) = h < D p,q (n + 1)
4 Bounds for D p,q (n) for Arbitrary n Lemma 10. Let p, q be integers such that p < q and p q. Moreover, let x and y be words of length n ≥ q such that p is a period of x, and q is a period of y but not of x. Then dist(x, y) ≥ n-q p . Proof. Since q is not a period of x, we have x i = x i+q for some position i, 0 ≤ i < n -q. Consider a set J = {j : 0 ≤ j < n -q ∧ j ≡ i (mod p)}. Since p is a period of x, we have x j = x j+q for each j ∈ J; on the other hand, y j = y j+q , so x j = y j or x j+q = y j+q . Moreover, p q implies that the positions j, j + q across j ∈ J are pairwise distinct. Consequently, dist(x, y) ≥ |J| ≥ n-q p . Theorem 11. If p < q, p q, and n ≥ p + q, then n-q p ≤ D p,q (n) ≤ 2 n-q p . Proof. The lower bound follows directly from Lemma 10. The upper bound is obtained using words (x, y) ∈ S p,q,n with string periods a p-1 b and (a p-1 b) k a r where q = kp+r. Indeed, x and y agree on the first q positions. After that, inside each pair of corresponding fragments of length at most p they have at most 2 mismatches.

Remark 12. In general, it is not true that D p,q (n) ≥ n-q p . For example, words x = cacbcacbcacbcacbcac and y = cacbcacacbcacacbcac of length 19, with shortest periods p = 4 and q = 6, respectively, satisfy dist(x, y) = 3 < 19-6 4 . Theorem 13. If p < q and p q and n ≥ p + q, then D p,q (n) ≥ 2n p+q .

Proof. We use the following claim:

Claim. If p < q and p q, then (a) N p,q (1) = q + p -1, (b) N p,q (2) = q + 2p -GCD(p, q) -1.

Proof. Observe that q + p ≤ q + 2p -GCD(p, q) ≤ q + q p p -1, so the values below are within the scope of Theorem 7. We have:

D p,q (q + p -1) = p-1 p + p+GCD(p,q)-1 p = 0 + 1 = 1 D p,q (q + p) = p p + p+GCD(p,q) p = 1 + 1 = 2.
This concludes the proof of part (a).

D p,q (q + 2p -GCD(p, q) -1) = 2p-GCD(p,q)-1

p + 2p-1 p = 1 + 1 = 2 D p,q (q + 2p -GCD(p, q)) = 2p-GCD(p,q) p + 2p p = 1 + 2 = 3.
This concludes the proof of part (b).

Consider words x ∈ P p (n), y ∈ P q (n) and their (p + q)-decompositions: α 1 , . . . , α k and β 0 , . . . , β k-1 . If α i = β i for some 1 ≤ i ≤ k, then, by the Periodicity Lemma, both α i , β i have period GCD(p, q); consequently, both x and y have period GCD(p, q), a contradiction. Hence, part (a) of the claim implies dist(α i , β i ) ≥ 2 for each i = 1, . . . , k.

Let α k+1 and β k+1 be the suffixes of x and y starting immediately after the last factors of the corresponding decompositions. If |α k+1 | < p+q 2 , then we already have that dist(x, y) ≥ 2 n p+q = 2n p+q . Otherwise, by part (b) of the claim applied for the words α k α k+1 and β k β k+1 , we have dist(x, y) ≥ 2 n p+q -1 + 3 = 2 n p+q + 1 = 2n p+q . In both cases we obtain the desired inequality.

Conclusions

The paper studies the following general type of question: How much dissimilar in a whole should be two objects which are different in some specific aspect?

The answer to this type of question heavily depends on the studied type of the objects. Thus sometimes the answer is completely trivial; for example, two different strings of the same length may differ at only a single position. In this work we show that if we consider different strings of the same length that are additionally periodic, then the implied number of positions where the two strings must differ can be large. The exact number depends on the length of the strings and on their periods.

a a b a a b a a b a a a 2 8 a a b a a b a a a a b a a a b a 3 10 a a b a a b a a b a a a b a a a b a a a 4 11 a a b a a b a a b a a a a b a a a b a a a b 5 17 a a b a a b a a b a a b a a b a a a a b a a a b a a a b a a a b ab a b a a 2 5 a b a b a a b a a b 3 9 a b a b a b a b a a b a a b a a b a 4 10 a b a b a b a b a b a b a a b a a b a a 5 11 a b a b a b a b a b a a b a a b a a b a a b 6 15 a

 15 Fig. 1. Upper table: Values of N3,4(h) for h = 1, . . . , 5 together with pairs of words of length N3,4(h) that have the Hamming distance h. Lower table: Values of D3,4(n) for n = 6, . . . , 17.

Fig. 2 .

 2 Fig. 2. The (1, 2, 4)-decomposition of ababbababaababaabaab is a ba bbab a ba abab a ab.

Fig. 4 .Fig. 5 .

 45 Fig.[START_REF] Berstel | Partial words and a theorem of Fine and Wilf[END_REF]. Illustration of the equalities in the lower bound in Lemma 6 for n = q + 2p -2.


Himanshu Verma
email: himanshu.verma@unifr.ch

Hamed S Alavi
email: hamed.alavi@unifr.ch

Denis Lalanne
email: denis.lalanne@unifr.ch

Rethinking Wearables in the Realm of Architecture

Keywords: well-being, human-building interaction, sustainable HCI

The architectural built environments, which so ubiquitously, act as shelters and shape our daily personal and social experiences, can soon be envisioned as being interacted with and mediated through wearables. This conjecture is becoming salient with the increased interactivity of our built environments, and a sustained drive to render them energy efficient. This entails for the upscaled re-design, appropriation, and assessment of functions that are typically ascribed to wearable technologies, as well as the grounding of users' sociotechnical interactions and experiences within the built environments.

In this position paper, we discuss this inevitable shift in the role of wearables and the expansion of its functional spectrum to include the built environments and the constituent social constructs, thus facilitating a comprehensive experience of inhabitants' well-being.

Introduction

Le Corbusier, in his 1923 book Vers une architecture, has referred to a building as a machine to inhabit. This perspective is growing ever more relevant with the continued accelerated measures to increase the efficiency of built environments in terms of energy consumption and performance. Consequently, existing built environments are increasingly retrofitted with interactive elements (for example, NEST thermostat 1 ) to optimize energy usage by a) automating specific functions, b) providing awareness about (the consequences of) inhabitants' actions, and c) providing a platform (in a long term) to change one's behavior towards energy-efficient living. Additionally, in newly constructed buildings, more specifically the one certified by low-energyconsumption standards (for example, Minergie in Switzerland), automated heating and ventilation systems have mandated the removal of operational windows. While these developments have been reported to be advantageous in conserving energy, the lack of control over the environment (as a consequence of automation) has raised concerns about the inhabitants' perceived comfort [START_REF] Milenkovic | Improving User Comfort and Office Energy Efficiency with POEM (Personal Office Energy Monitor)[END_REF], [START_REF] Brambilla | Our inherent desire for control": A case study of automation's impact on the perception of comfort[END_REF]. Furthermore, the furnish-ing of varied interactive and awareness devices calls for the design, appropriation, and assessment of new interaction paradigms and socio-technical practices. These evolving concerns and opportunities entail the monitoring of environmental parameters, knowledge about existing social constructs, and acute context awareness followed by recommendations for contextualized actions on the part of both the built environment and the inhabitants.

The functions of continued observance, diagnosis, and awareness of individuals' physical or physiological state are already ascribed to numerous wearable devices (for example fitness and activity trackers, medical implants, etc.). We believe that with the evolution of our built environments, these aforementioned functions are being expanded to include, beyond just the physiological state, the (spatio-temporal) knowledge about our physical environment and social contexts. Consequently, we can envision supplementing the role of wearables as a facilitator for our (two-way) interactions with the built environments and other inhabitants, in a way that our living/working experiences are grounded within an ecosystem of socio-technical systems comprising of sensors, actuators, ambient information, and data analyses. Furthermore, a (multi-modal) data-centric approach may manifest in the "quantified home (or office)" as an extension of the lifelogging movement.

In the following sections, we will illustrate this notion with the (developing) perspective of Human-Building Interaction (HBI) [3] [4], as well as our own participatory experiences within an interdisciplinary living lab project comprising of architects, building performance researchers, designers, and us (HCI researchers).

Human-Building Interaction (HBI)

Human-Building Interaction (HBI) is an emerging notion at the intersection of architecture, interaction design, and UbiComp that aims "to provide interactive opportunities for the occupants to shape the physical, spatial, and social impacts of their built environments" [START_REF] Alavi | Future of human-building interaction[END_REF]. Interaction design and UbiComp have on numerous occasions drawn inspirations from the domains of architecture and urban design. However, the concrete possibilities for these domains to closely work together have been rare in the past [START_REF] Alavi | Deconstructing human-building interaction[END_REF]. HBI is (consequently) an attempt to bring together researchers from these contributing domains to share knowledge and work in close cooperation, in order to design for the sustainable living experiences while addressing the evolving living and working styles and habits of inhabitants. Smart Living Lab, as discussed in the next section, is a unique project which is the manifestation of principles at the core of HBI.

Smart Living Lab

Smart Living Lab 2 is an inter-disciplinary lab engaged in the envisioning of the built environments of the future by examining the research questions that concern sustainable living and working experiences, which are grounded in the evolving socio-cultural practices. A prototype building was constructed to study these aspects in central Switzerland, in the bilingual city of Fribourg. This building currently serves as a workspace for around 100 researchers from three academic institutions -Swiss Federal Institute of Technology (EPFL), University of Fribourg, and School of Engineering and Architecture in Fribourg (HEIA). The researchers come from different domains of Architecture, Building Physics and Performance, Design, Law, and HCI. Amongst multiple projects that are currently being pursued, inhabitants' well-being and the perception of comfort within the changing landscape of modern architecture, as well as the role of human factors in building design are the research topics which we are currently investigating.

Our contributions within the Smart Living Lab, so far have focused on the ecologically valid and multivariate building-data visualization, exploration and analysis, which may reveal varied aspects of occupants' behavior in different scenarios. This data-centered approach has implications for the comprehension of occupants' wellbeing, and simultaneously augment it through well-grounded socio-technical interactions and experiences. Here, we believe that the wearable technologies have a crucial part to play.

3

Beyond Quantified Self -Quantified Buildings

The potential expansion of wearables' functional spectrum to include our built environment may augment our self-awareness about our well-being by including aspects of comfort and its perception, as well as the contextualized negotiation of environmental state (temperature, air quality, etc.) with fellow inhabitants while maintaining a sustainable living practice. This entails design, appropriation, and evaluation of new interaction mechanisms with the built environment, either directly or indirectly through wearables by examining the dynamic socio-cultural practices through an amalgamation of ethnography, interaction design, and (sensor-) data analytics. In this section, we illustrate the varied dimensions and scenarios that may constitute this shift in our fine-grained awareness beyond ourselves to our environment. These dimensions correspond to the multiple sources of available physical and physiological data from sensors, which can facilitate the acquisition of knowledge about the context (number of inhabitants, ongoing activity, physiological history, etc.), and offer a quantitative platform to negotiate environmental state between a human and a building (for example POEM [START_REF] Milenkovic | Improving User Comfort and Office Energy Efficiency with POEM (Personal Office Energy Monitor)[END_REF]), or amongst inhabitants themselves. In the following sections, we will especially focus on dimensions pertaining to the quality of indoor environment and mobility of its individuals, as these are the dimensions which can afford an extension to the conventional wearables.

Environmental Characteristics

Environmental characteristics concerning well-being can be grouped into four categories of thermal, respiratory, visual, and acoustic well-being [START_REF] Bluyssen | Comfort of workers in office buildings: The European HOPE project[END_REF], [START_REF] Hawkes | The environmental imagination: technics and poetics of the architectural environment[END_REF]. While significant amount of research has been conducted in different domains on the thermal and res-piratory aspects, relatively less work accounts for the visual and acoustic aspects. This can be attributed to the immediately perceived effects of thermal environment (temperature, humidity, and air-flow) [START_REF] Fanger | Thermal comfort. Analysis and applications in environmental engineering[END_REF], and the adverse effects of inferior respiratory environment owing to the increased concentration of gases such as Carbon Dioxide, pollutants and particulate matter [START_REF] Bornehag | The association between asthma and allergic symptoms in children and phthalates in house dust: a nested case-control study[END_REF], [START_REF] Fisk | Meta-analyses of the associations of respiratory health effects with dampness and mold in homes[END_REF]. The relevance of the respiratory environment is further heightened due to the adverse effects of poor air quality on human health, the lack of awareness about the air quality within buildings [START_REF] Kim | inAir: measuring and visualizing indoor air quality[END_REF], [START_REF] Frešer | An intelligent system to improve THC parameters at the workplace[END_REF], and especially crucial in metropolitan cities which experience increased levels of pollution.

Sensors recording different attributes of these dimensions can be distributed within the built environment, which in tandem with ambient and distributed awareness tools may prove to be informative to the inhabitants. Subsequently, these awareness (and visualization) tools can offer informed recommendations to the inhabitants about the set of possible actions (for example opening windows to allow for cross-ventilation). In addition, they can also provide an interactive platform for inhabitants to negotiate their comfort parameters (for example, in case of conflicts resulting from varying thermal perceptions). ComfortBox by Alavi et al. [START_REF] Alavi | Comfort": A coordinate of User Experience in Interactive Built Environments[END_REF] is an example of such a tool that affords for awareness about these four dimensions, a possibility to inform the building (through interactions) about levels of acceptable comfort, and communicate one's perceived comfort to other inhabitants.

The perceived loss of control over different architectural elements such as windows and shades, with the increased automation of buildings and its environment, has also been observed by Brambilla et al. [START_REF] Brambilla | Our inherent desire for control": A case study of automation's impact on the perception of comfort[END_REF] to negatively influence the perceived wellbeing of inhabitants. This further exacerbates the need for tools and mechanisms that can mitigate this negative perception by providing awareness, empowering inhabitants to express their opinions about their well-being, and eventually enabling them to negotiate the desired environment. Furthermore, we envision that the living experience can be enriched by combining physiological information from conventional wearables (for example, body temperature, skin conductance), as it can facilitate the acquisition of precise knowledge about an inhabitant's health status, and enable the development of personalized and contextualized well-being models.

Presence and Proximity

Presence (or absence) of inhabitants within home, office, or a specific room, or proximity to certain artifacts and architectural elements within the building are vital resources to establish a precise context awareness for the built environment. Smart home technologies (for example, NEST thermostat, smart lighting) leverage this information to regulate the environmental state by controlling the HVAC (Heating, Ventilation, and Air Conditioning), or lighting systems, and consequently optimize the energy consumption. These systems often use the geo-location information of an inhabitant's smart phone to accomplish their goals. Furthermore, at a finer level of granularity, the presence information can be used to precisely model the context such as the number of inhabitants and thus the likely activity the inhabitants are engaged in, or in specific cases to detect unexpected behavior for security reasons. Indoor localization techniques can be used to access this in-formation. Besides allowing for finer control over the environmental attributes, the presence information can also be used to assess various building functions in the postoccupancy phase of a building. The study conducted by Verma et al. [START_REF] Verma | Studying Space Use: Bringing HCI Tools to Architectural Projects[END_REF] employed presence information (specifically indoor mobility) to assess if the rooms within an office building were used to their full capacity, and how inhabitants with different professional profiles contributed to the utilization of office space. Such studies, in the short term, allow for the sustainable use of buildings and provide implications for design and appropriation. In the medium term, they can act as valuable knowledge resources for the next phase of building life-cycle, and in the long term they contribute to the repertoire of knowledge about human factors in built environment. Therefore, the presence and proximity information can be leveraged with the wearables to attain a comprehensive understanding of inhabitants' behavior, and this can be utilized extensively to expand wearables' functionality beyond health monitoring to design contextualized interactive services and tools.

Social Attributes

Environmental attributes and inhabitants' localized information can be easily accessed through a combination of distributed sensors, and can be simultaneously leveraged to interact with our built environments. In addition, social cues and signals (such as speech times, turn-taking, proximity to other inhabitants, etc.) which constitute an integral aspect of human communication, can further enrich the contextualized knowledge of the built environment. These social aspects which are investigated and designed for by researchers in the CSCW (Computer Supported Collaborative Work) community can be utilized, either directly or indirectly, by wearables to enable occupants to exercise fine control over buildings. Furthermore, the abundant knowledge within the CSCW community, which was acquired through the analysis of social interactions (verbal and non-verbal) may foster the design of collective awareness tools (about environmental factors -both indoor and outdoor). Such tools, in the short term may allow the occupants to negotiate their comfort levels, and in the long term can motivate occupants to regulate their behavior for a sustainable living experience.

Sketching the Research Landscape

Following the illustration of the broad constellation of variables (physical, physiological, social) that can -individually or in combination -influence our immersive experiences with or within our built environments, the next logical step would be to answer questions concerning inhabitants' needs, expectations, and mental models about the nature of interaction, interactivity, and immersiveness within our environments. In addition, discussions need to be organized around the role of wearables in mediating our interactions with the built environments, how this mediation will scale with the changing landscape of socio-cultural contexts, and where (within the broad spectrum of dynamic user experiences) will the wearables contribute significantly. This entails the establishment of an interdisciplinary knowledge about perception of environmen-tal attributes, user experience, and inhabitant behavior through research efforts at the intersection of computer science, architecture, psychology, and sociology. In this section, we attempt to sketch the future research landscape by asking questions concerning the following themes, answers to which will concretely consolidate the role of wearable technologies in human-building interaction (HBI).

Agency or Control

The evolution of architecture through the incorporation of interactive and robotic elements (such as window blinds), is bringing to the forefront, the issues related to the inhabitants' agency or the sense of control over the built environment. This entails raising questions that are fundamental to the ascribed behaviors and afforded functions of wearables embodied within our interactive experiences with the built environments. For example, how do we bridge the gap between the individuality of wearables and the commonality of architecture? How can the coupling of wearables and adaptive/robotic environments provide for a seemingly integrative experience to the users? Or what features can be extracted from wearable sensing that could shed light on the points of inefficiency in the interaction between built environments and their occupants? Furthermore, how can our perception of environmental factors and our subjective experiences be leveraged and integrated by the wearables to enhance the overall user experience? In social scenarios, how can the agency be shared between co-habitants, or delegated to a specific inhabitant? One of the HBI challenges is to reconcile inhabitants' agency with the efficiency of building automation systems. So, how can wearables help address this challenge? Also, how can the wearables be designed as persuasive platforms to encourage inhabitants to pursue sustainable and environmental friendly behaviors, for example, through the awareness about the consequences of their actions?

Health and Awareness

Consolidating the monitoring of inhabitants' health and well-being and their awareness can easily be regarded as the extension of wearables' capabilities to include the environment. However, this extended functionality has to be well-grounded within the context (location, activity, weather, etc.), physiological state, subjective preferences, and the social context of inhabitants. In addition, how can the wearables in-tandem with other environmental sensors contribute in the understanding of personalized comfort models/zones of the inhabitants? How do these personalized models differ in varying socio-cultural contexts? How can the wearables make inhabitants' more aware of their environmental attributes, especially about the health critical attributes such as air quality? When and how should the wearables intervene as the environmental attributes change (possibly from comfortable to relative discomfort), and what recommendations about the possible actions should they offer? Next, framing the issue of health awareness within the notion of biopower and biopolitics [START_REF] Foucault | The Birth of Biopolitics[END_REF] [START_REF] Rabinow | Biopower today[END_REF], which examines the "truth discourses" about human body, health, and life, and the "authorities which are competent enough to convey this truth" such as the wearable technologies and the role of data in assessing our health. Biopolitics, further examines the authority around the discourses related to life and health by questioning the role of authority itself and who can be considered as an authority. For example, does technology has an authority over our experiences related to health and well-being within the built environments, or the inhabitants themselves? These questions have to be grounded and studied within the architectural context while designing wearables to mediate/augment our experiences with our built environments.

Privacy and Data Protection

Owing to the a) massive amount of data that is collected through the wearables and the ambient sensors within the built environment, b) its storage and analysis on (cloud) servers, c) extraction of health-related features, and d) the potential inference of the state of the inhabitants' health and its relationship to the medical history and the personalized models of comfort as well as the context-sensitive information, render privacy and data protection a critical aspect of the design and application of wearables within architectural environments. These issues entail for the examination of privacy as a fundamental right since the beginning of the design process and not as a byproduct, for example privacy by design [16] [17]. Who owns the data (inhabitants, building, or both), or has the authority over the actions resulting from data analysis and inference? In what circumstances or contexts, can the data be shared with external agents, and to what extent? How will the privacy and data protection policies evolve in varying social scenarios (for example, while hosting guests)? Going beyond the user consent, strategies and policies should be developed to evaluate the inherent risks and prevent the misuse of personal data without compromising the quality of service and the user experience.

Conclusion

In this position paper, we have argued that with the increased interactivity of our built environments and an enhanced need for sustainable living, the well-being (or comfort) of inhabitants is being rendered crucial. Here, we believe, that the wearable technologies can play a vital role in diluting the boundaries of self to (also) include our built environments. This extension in the functional spectrum of wearables is happening with the increased diffusion of different sensors (recording the thermal, respiratory, acoustic, and visual aspects of built environments), and the increasing interactivity of our living and working spaces. Furthermore, the physiological data that is being collected and analyzed by wearable devices can be combined and communicated with our built environments to a) maintain a precise awareness of the context (inhabitants' health status and the ongoing activity), b) increase the inhabitants' awareness about the environmental factors and their influence on health, c) enable a fine grained control over our built environments while optimizing the energy consumption, d) provide inhabitants with a platform to negotiate their comfort with others, and thus e) foster an enhanced living and working experience. Finally, we have drawn out the emerging research landscape as a consequence of the diffusion of wearable devices within the interactive experiences with our built environments, by raising relevant questions concerning agency, well-being, awareness, and privacy.

https://nest.com/thermostat/meet-nest-thermostat/

https://smartlivinglab.ch


Carmelo Ardito
email: carmelo.ardito@uniba.it

Maria Francesca Costabile

Giuseppe Desolda
email: giuseppe.desolda@uniba.it

Rosa Lanzilotti
email: rosa.lanzilotti@uniba.it

Maristella Matera
email: maristella.matera@polimi.it

Reflections on System Properties Valued by End Users in Designing End-User Development Systems

Keywords:

ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

Introduction

Exponential technological advances push end users to evolve from having traditional roles as passive information consumers to more active ones. Users are increasingly willing to shape the systems they use to adapt them to their needs, tasks and habits, by manipulating and tailoring software artifacts and create new configurations or new designs. Accordingly, the goal of human-computer interaction (HCI) has been evolving from just making systems easy to use (even though that goal has not yet been completely achieved) to building frameworks that can lead to systems easy to create. This challenge is addressed by the End-User Development (EUD), an emerging paradigm that aims to empower end users to let them develop and adapt systems by themselves.

A widely accepted definition of EUD is provided by Lieberman et al.: "A set of methods, techniques, and tools that allow users of software systems, who are acting as nonprofessional software developers, at some point to create, modify, or extend a software artifact" [START_REF] Lieberman | End-User Development: An Emerging Paradigm[END_REF].

Enabling EUD entails providing end users, who in most cases are not technologically skilled, with appropriate environments and tools that allow them to contribute to the design, development and evolution overtime of software artifacts. Tasks that are traditionally performed by professional software developers are thus transferred to end users, who become co-designers of the tools and products they will use. This does not imply transferring the responsibility of good system design to them. It actually makes the work of professional developers even more difficult, since end users have to be supported in their new roles as designers and developers.

Building systems that permit EUD activities requires a shift in the design paradigm, which must move from user-centered and participatory design to meta-design, characterized by two main phases [START_REF] Costabile | Visual Interactive Systems for End-User Development: A Model-Based Design Methodology[END_REF][START_REF] Fischer | Meta-design: a manifesto for end-user development[END_REF]. The first phase consists of creating the design environments that allow system stakeholders to participate in the design (meta-design phase). The second phase consists of the design of the final applications, carried out by the joint work of the various stakeholders, who collaborate through their design environments (design phase).

According to the meta-design paradigm, all system stakeholders, including end users, are active members of the design team. The professional developers involved in the traditional design are the team of meta-designers, who create software environments through which the other stakeholders, acting as designers, can be creative and can adapt the software to fit their specific needs. They can create and modify elements (objects, functions, user interface widgets, etc.) of the system of interest, and exchange the results of their activities to converge to a common design.

Since 2004, the researchers at the Interaction, Visualization, Usability and UX (IVU) Lab have worked on theories, methodologies, models and tools to foster the adoption of EUD systems by non-technical end users in real and various contexts such as ehealth, e-commerce, serious games, and cultural heritage (see [START_REF] Ardito | End users as codesigners of their own tools and products[END_REF] for a short description of these tools). Later, starting 2012, they have been collaborating on these topics with researchers of the Politecnico di Milano, in particular on the development of EUD platforms for web mashup [START_REF] Ardito | User-driven visual composition of service-based interactive spaces[END_REF] and smart objects configuration [START_REF] Ardito | Enriching exploration of archaeological parks with mobile technology[END_REF]. In the following of this paper, we describe our experience in designing an Electronic Patient Record (EPR) EUD systems in the e-Health domain and a web mashup platform that has been customized to the Cultural Heritage (CH) and the Technology Enhanced Learning (TEL) domains.

2

The electronic patient record case study

The first case study refers to the medical domain. The authors collaborated with the physicians of the "Giovanni XXIII" Children Hospital of Bari, in Southern Italy, to develop some applications to support their work. In some meetings, the advantages of an Electronic Patient Record (EPR) for managing data about patient history were discussed. They clearly remarked the difficulties of accepting one of the many proposals of EPR, because they impose to practitioners predefined document templates and masks. Physicians, nurses and other operators in the medical field are reluctant to accept such unified templates; as various authors also observed [START_REF] Morrison | Observing End-User Customisation of Electronic Patient Records[END_REF][START_REF] Cabitza | WOAD: A Framework to Enable the End-User Development of Coordination-Oriented Functionalities[END_REF][START_REF] Cabitza | Tailorable flexibility: Making end-users autonomous in the design of active interfaces[END_REF], they want to customize and adapt the EPR to their specific needs. Thus, the EPR is a natural target for EUD.

First, a contextual enquiry was carried out to study the domain, to identify and analyze the main system stakeholders, and to acquire the necessary knowledge to inform the model-based design. The following stakeholders for the EPR management were identified: 1) practice manager; 2) head physicians; 3) physicians; 4) nurses; 5) administrative staff, 6) patients. In particular, the head physician has the right and the responsibility to decide about the patient record adopted by physicians and nurses of his ward. The analysis of the work activities clearly showed that each ward personnel use their specific patient record.

Then, we created the meta-design team composed by software engineers, HCI experts and the practice manager, a domain-expert whose knowledge is necessary to design the EPR modules. The meta-design team created the software environments for the different stakeholders, as well as the data modules, which are the basic component of the EPR, and the application template to allow each head physician to design the EPR for her/his ward by directly manipulating data modules in her/his SSW. The main interface of the head physician's software environment is shown in Fig. 1. The feedback received from the involved end users was positive and encouraging. The domain experts appreciated very much the meta-design approach, which allowed them to contribute to the design of the final applications. The head physicians the authors worked with at the hospital were never satisfied of the various proposal of EPR they had examined, which forced the adoption of a format not adequate to the needs of their wards; thus, they liked a lot the opportunity to eventually shape the EPR tailored to their wards. Another positive remark of the domain experts was that they felt to be actually aided in their designer role both by the appropriateness of the tools available in their design environment.

Web mashup platform case studies

Web mashup platforms accommodate very well EUD, as they allow end users to create new applications by integrating functions and content exposed by remote services and Web APIs [START_REF] Daniel | Mashups -Concepts, Models and Architectures[END_REF]. We performed two field studies in different application domains, as reported in details in [START_REF] Ardito | Creation and Use of Service-based Distributed Interactive Workspaces[END_REF]. One study was carried out in the context of visits to archaeological parks. Two professional guides composed a mashup application for retrieving content relative to an archaeological park using a desktop application, accessible through a PC placed in their office (Fig. 2a). They associated media contents, such as photos, videos, and wiki pages with park locations to be visited during the guided tour, by searching for them on public API sources. Later, during a guided visit of the archaeological park, two guides used the mashup application to show the content to visitors by using a large interactive display when introducing the visit (Fig. 2b) and a tablet device during the tour in the park (Fig. 2c). Content was represented by a pin on a Google map centered on the park. By tapping on an icon, a pop-up window visualized the corresponding media. 3). The retrieved information can also be communicated and shared with the teacher and the other students using interactive whiteboards, desktop PCs and personal devices (e.g., laptop, tablet and smartphone). Both the studies demonstrated that the platform is sufficiently easy to use and users felt quite supported in accomplishing their tasks. Most participants appreciated the value of the platform in enabling easy and effective integration of content retrieved on the fly from online APIs. Low response time of the platform was indicated as a negative aspect, but this was due to the very poor technology infrastructure available both at the archaeological park and at the school lab.

Participants highlighted the lack of collaboration tools, such as chats or forums. Other remarks also concerned distributed collaborative creation of components and functions to annotate services, widgets, and information items.

The studies also revealed new requirements that mashup platforms should feature to foster their adoption in real contexts. The users expressed the need to "manipulate" data extracted from services. They highlighted that through the platform they could not perform much more than visualizing data, modifying visualizations, and inspecting data details. They would instead appreciate functions to make the displayed information actionable, i.e., suitable for being manipulated according to their task goals [START_REF] Ardito | Making mashups actionable through elastic design principles[END_REF]. For example, in the content retrieval task, beyond composing services and choosing how to visualize retrieved content, participants also wanted to perform ordering, filtering, or selecting a specific part of a content item, possibly annotating the selected parts with comments. Another important requirement that emerged is related to the information retrieval power of the mashup platforms: users reported that, in order to satisfy complex information needs, data should be gathered from the entire Web -not only from web service APIs.

Discussion and Conclusion

EUD has started the trend toward a more active involvement of end users in the overall software design, development, and evolution processes, to allow them becoming codesigners of the tools and products they will use. The studies showed that the users of EUD tools are focused on aspects related to the effectiveness in supporting the tasks they are performing and the customizability of the system in respect to the their tasks. Therefore, other system properties come into play. One is the system flexibility, an ingredient that can be favored by the identification of elementary components that can then be assembled together to give life to brand new interactive systems. In this case, the focus on usability is more related to the composition paradigm offered to the end users than to the final interactive applications the end users build by themselves.

In the specific context of the mashup platform, in which the overarching goal was information retrieval, end users also considered important other factors such as quality, completeness and trust of the retrieved data [START_REF] Cappiello | Information Quality in Mashups[END_REF], as well as peer communication, sharing and annotating features. Nobody considered other attributes related to aesthetic, graphic aspect, security, privacy. The results of previous evaluations of EUD tools, applied in different application domains and based on various technologies (e.g., electronic patient records, e-commerce websites, cultural heritage authoring tools), also confirm that end users consider important the capability of their own tools to support them in hitting their goal.

This analysis suggests that in this new process the responsibility of good system design cannot be transferred to end users, who have to be assisted by other ICT professional stakeholders in this new role of designers and developers. This actually makes the work of professional developers even more difficult, since: a) it is still their responsibility to ensure the quality of the software artifacts created by end users [START_REF] Ko | The state of the art in end-user software engineering[END_REF], and b) they have to create proper tools that support end users in this new role. In order to address these issues, our methodology for designing EUD systems is based on a metadesign model. Differently than in traditional design, professional developers do not directly create a final application, but they build software environments thorough which non-technical end users, acting as co-designers, are enabled to shape up the application they are going to use.

Another issue, which emerged in the field studies that we have conducted to validate our tools, is that some problems occur when the proposed EUD systems are too "general", claiming that one single design might satisfy the requirements of many domains. We therefore proposed domain customization as a solution to make meta-design still more effective in creating platforms that really fit the end-user needs [START_REF] Ardito | A Three-Layer Meta-Design Model for Addressing Domain-Specific Customizations[END_REF]. For example, in the case of the mashup platform experiences, customization occurs by selecting and registering into the platform services and data sources (public or private) that, for any different domain, can provide content able to fulfill specific users' information needs.

Service registration is kept as simple as possible, so that even non-technical users can possibly add new services if needed.

Our current research is focused on designing EUD systems for the configuration of smart objects by non-technical users [START_REF] Desolda | Empowering End Users to Customize their Smart Environments: Model, Composition Paradigms, and Domain-Specific Tools[END_REF]. As future work in the direction of investigating which system properties are valued by EUD-system users, we will exploit this new application domain to address issues such as how our meta-design and customization approach can be possibly modified in order to manage competing properties. In particular, we want to revise the role of the HCI expert, already included in the meta-design team, so that he/she can be empowered in providing guidance and feedback to end users when they act as designers.

Fig. 1 .

 1 Fig. 1. Screenshot of the software environment used by the head physician for creating the EPR for the personnel in his ward by dragging the data modules from the left side to the right side

Fig. 2 .

 2 Fig. 2. A professional guide interacts with the mashup platform visualized on a PC for retrieving and organizing content on a map (a), which is later shown on a large interactive display (b) or a tablet (c) a

Fig. 3 .

 3 Fig. 3. A workspace on Invertebrates animals, organized as a mind map, created by the teacher using a desktop PC and later integrated by the students with further content as part of their homework.

Acknowledgments. This work is partially funded by the Italian project SHELL (Shared Interoperable Home Ecosystems for a Green, ComfortabLe and Safe Living -CTN01 00128 111357) and by the project COSMOS (Creation Of SMart spaces fOr end-uSer empowerment) funded by the University of Bari Aldo Moro.