计算机与现代化

• 算法分析与设计 • 上一篇    下一篇

基于贪心算法的智能宿舍分配方法

  

  1. 杭州电子科技大学计算机学院,浙江杭州310018
  • 收稿日期:2017-04-12 出版日期:2018-01-23 发布日期:2018-01-24
  • 作者简介:曹雪雪(1990-),女,安徽宿州人,杭州电子科技大学计算机学院硕士研究生,研究方向:计算机技术。
  • 基金资助:
    浙江省科技厅公益项目(2015C34008); 杭州市科委项目(20150834M05)

Intelligent Dormitory Allocation Method Based on Greedy Algorithm

  1. School of Computer Science and Technology, Hangzhou Dianzi University, Hangzhou 310018, China
  • Received:2017-04-12 Online:2018-01-23 Published:2018-01-24

摘要: 针对传统宿舍分配方法未考虑学生自身情况的问题,提出一种新的宿舍分配方法。以贪心算法为基础,宿舍分配前,先对学生的入睡习惯、起床习惯、性格特点和生活费用等属性进行问卷调查,学生可根据个人情况对各个选项赋予权重。根据问卷结果,计算学生间的匹配度,将匹配度高的学生分配到一间宿舍。与传统宿舍分配方法相比,该方法充分考虑学生的自身情况,有助于学生的和谐相处。

关键词: 贪心算法, 宿舍分配, 权重

Abstract: For the problem issued in the traditional method of dormitory allocation that lacking of consideration about student’s own situation, a new method of dormitory allocation is proposed in this paper. Based on the greedy algorithm, before the dormitory allocation, we survey sleep habits, get up habits, character and living expense of students, and students can give weight to each option based on individual situation. This method can calculate the degree of match between students according to the results of questionnaire, and assign the students with the high degree of match to same room. Compared with the traditional method, this method takes into account the circumstances of students, contributing to the students to live in harmony.

Key words: greedy algorithm, dormitory allocation, weights

中图分类号: